Skip to content

Commit 15043f8

Browse files
committed
On unexpected exceptions, re-rise from original type
1 parent b887f73 commit 15043f8

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

astroquery/eso/core.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -256,8 +256,7 @@ def message(query_str):
256256
except DALFormatError as e:
257257
raise DALFormatError(message(query_str) + f"cause: {e.cause}") from e
258258
except Exception as e:
259-
raise RuntimeError(
260-
f"Unhandled exception {type(e)}\n" + message(query_str)) from e
259+
raise type(e)(f"{e}\n" + message(query_str)) from e
261260

262261
return table_to_return
263262

0 commit comments

Comments
 (0)