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

raise ... from ... not supportet by exception-formatter? #14

Open
jensens opened this issue Aug 25, 2022 · 1 comment
Open

raise ... from ... not supportet by exception-formatter? #14

jensens opened this issue Aug 25, 2022 · 1 comment

Comments

@jensens
Copy link
Member

jensens commented Aug 25, 2022

BUG or UNSUPPORTED PYTHON FEATURE

What I did:

In my code used the raise from construct see also https://www.pythontutorial.net/python-oop/python-raise-from/:

try: 
   # some code
   ...
except SomeExeception as exc:
   raise MyException("my message") from exc

What I expect to happen:

an output like in core Python:

Traceback (most recent call last):
    ...
SomeExeception: some message

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
   ...
ValueError: my message

What actually happened:

I get only

Traceback (most recent call last):
   ...
ValueError: my message

What version of Python and Zope/Addons I am using:

Python 3.10 with Zope 5 and Plone 6

@davisagli
Copy link
Member

Also see zopefoundation/zope.exceptions#11

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