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

Better trace reporting for chained exceptions #1122

Closed
moorecm opened this issue Oct 7, 2015 · 2 comments
Closed

Better trace reporting for chained exceptions #1122

moorecm opened this issue Oct 7, 2015 · 2 comments

Comments

@moorecm
Copy link

moorecm commented Oct 7, 2015

Consider a test that raises an exception, after catching some other exception, and chaining them:

def test_that_raises():
try:
raise Exception('I want to know the type of exception and this message somewhere")
except Exception as ex:
raise Exception('A new custom exception that is more general') from ex

The test report shows the second Exception instance and its information but does not include the chained exception and its information. This is important for debugging and Python 3.4 appears to show a nice trace of both if left uncaught (outside of pytest).

@The-Compiler
Copy link
Member

This seems to be a duplicate of #138.

@moorecm
Copy link
Author

moorecm commented Oct 7, 2015

Agreed. Thanks!

Sent from my iPhone

On Oct 7, 2015, at 5:07 PM, Florian Bruhin notifications@github.com wrote:

This seems to be a duplicate of #138.


Reply to this email directly or view it on GitHub.

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

No branches or pull requests

2 participants