Skip to content

Commit 55d6619

Browse files
committed
Restore original exceptions.
1 parent a8154fd commit 55d6619

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

astroquery/jplhorizons/core.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
from ..query import BaseQuery
2121
# async_to_sync generates the relevant query tools from _async methods
2222
from ..utils import async_to_sync
23-
from ..exceptions import TableParseError
2423
# import configurable items declared in __init__.py
2524
from . import conf
2625

@@ -1301,10 +1300,7 @@ def _parse_result(self, response, verbose=None):
13011300
# this is allowed: if `cache` was set to False, this
13021301
# won't be needed
13031302
pass
1304-
raise TableParseError("Failed to parse JPL Horizons result. "
1305-
"The raw response can be found in "
1306-
"`self.last_response`. Exception: "
1307-
+ str(ex)) from ex
1303+
raise
13081304
return data
13091305

13101306

astroquery/jplhorizons/tests/test_jplhorizons.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# Licensed under a 3-clause BSD style license - see LICENSE.rst
22

3+
from multiprocessing import Value
34
import pytest
45
import os
56
from collections import OrderedDict
@@ -62,7 +63,7 @@ def test_parse_result(patch_request):
6263
q = jplhorizons.Horizons(id='tlist_error')
6364
# need _last_query to be defined
6465
q._last_query = AstroQuery('GET', 'http://dummy')
65-
with pytest.raises(TableParseError):
66+
with pytest.raises(ValueError):
6667
res = q.ephemerides()
6768

6869

0 commit comments

Comments
 (0)