-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
import_plugin hides exception source #2491
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 |
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: