-
-
Notifications
You must be signed in to change notification settings - Fork 616
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
sys.excepthook not always firing #1026
Comments
This will require a fix in pex itself. Right now it forceably traps any exception and prints its backtrace before turning off the sys.excepthook in a finally. It should probably directly invoke the sys.excepthook that's installed: https://github.com/pantsbuild/pex/blob/master/pex/pex.py#L276 |
Next step is to ingest pex 0.8.6 when its released. After that our custom except hook needs work - as-is, when its fired both |
Thanks John! On Sat, Feb 7, 2015, 7:10 PM John Sirois notifications@github.com wrote:
|
Last step is to upgrade to pex 0.8.6 when it's released. That release is tracked here: pex-tool/pex#43 |
Upgraded @ 6d4d1f5 |
In our repo running from a custom .pex installation of pants, we've noticed stacktraces coming out when we don't expect them. When I went in to debug this, I noticed that if you pass a bad spec on the cmdline, the
_unhandled_exception_hook()
method doesn't get run.Here's how to reproduce it:
First, from a clean mastter branch, edit src/python/pants/bin/pants_exe.py and add a print stmt to
_unhandled_exception_hook()
as follows:Now, execute pants in dev mode with a bogus target to see that it is working:
Now, run the same command, but this time from a pex:
It appears that the method we passed to sys.excepthook isn't being called!
The text was updated successfully, but these errors were encountered: