Skip to content
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

cli: don't raise from excepthook #1495

Merged
merged 2 commits into from Aug 22, 2017

Conversation

kyrofa
Copy link
Contributor

@kyrofa kyrofa commented Aug 18, 2017

Raising exceptions from excepthook does not seem to be expected by Python, causing it to print "Error in sys.excepthook: [...]" which may look a little confusing, as the excepthook has nothing to do with the error. Instead of raising again and relying on Python to further handle the exception, print the traceback ourselves and exit appropriately.

Copy link
Collaborator

@sergiusens sergiusens left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice diligence in updating the comments!

Raising exceptions from `excepthook` does not seem to be expected by
Python, causing it to print "Error in sys.excepthook: [...]" which may
look a little confusing. Instead of raising again and relying on Python
to further handle the exception, print the traceback ourselves and exit
appropriately.

Signed-off-by: Kyle Fazzari <kyle@canonical.com>
Copy link
Contributor

@come-maiz come-maiz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for taking care of it.

@sergiusens sergiusens added this to the 2.34 milestone Aug 22, 2017
@sergiusens sergiusens merged commit f09ea71 into canonical:master Aug 22, 2017
@kyrofa kyrofa deleted the bugfix/excepthook_no_raise branch August 23, 2017 16:05
kalikiana pushed a commit to kalikiana/snapcraft that referenced this pull request Sep 21, 2017
Raising exceptions from `excepthook` does not seem to be expected by
Python, causing it to print "Error in sys.excepthook: [...]" which may
look a little confusing. Instead of raising again and relying on Python
to further handle the exception, print the traceback ourselves and exit
appropriately.

Signed-off-by: Kyle Fazzari <kyle@canonical.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants