import_plugin hides exception source #2491
Closed
Labels
Comments
I am taking it. Or somebody working on this? |
Not that I know of, please go ahead! |
@RonnyPfannschmidt Could you please let me know what kind of stack-trace you are expecting? |
@srinivasreddy anything that includes the origin of the error, python3 does this nicely on its own when correclty chaining exceptions, |
Now that we use |
@nicoddemus it cant magically enhance python2 as far as i understood |
I was thinking of something like this: import six, sys
def load_myplugin():
from unittest import fail
def load_all_plugins():
try:
load_myplugin()
except Exception as e:
if six.PY2:
six.reraise(type(e), type(e)('While loading plugin "myplugin":' + '\n' + str(e)), sys.exc_info()[2])
else:
raise type(e)('While loading plugin myplugin')
load_all_plugins() Python 2:
Python 3:
|
@nicoddemus those combinations look good |
I created a pr to solve this issue can someone plz check it? |
Fixed by #2791 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
as an example
its not that helpful to get the traceback cut at a bad location
The text was updated successfully, but these errors were encountered: