I'm trying to catch an exception and raise a more specific error at a point in my code:
try:
something_crazy()
except SomeReallyVagueError:
raise ABetterError('message')
This works in Python 2, but in Python 3, it shows both exceptions:
Traceback(most recent call last):
...
SomeReallyVagueError: ...
...
During handling of the above exception, another exception occurred:
Traceback(most recent call last):
...
ABetterError: message
...
Is there some way to get around this, so that SomeReallyVagueError
's traceback isn't shown?