Commit graph

5 commits

Author SHA1 Message Date
Dan Halbert
69b667406b MPy v1.22 merge: initial merge; not compiled yet 2024-07-25 15:16:24 -04:00
Matthias Urlichs
3fb1bb131f py/vm: Don't emit warning when using "raise ... from None".
"Raise SomeException() from None" is a common Python idiom to suppress
chained exceptions and thus shouldn't trigger a warning on a version of
Python that doesn't support them in the first place.
2023-10-09 09:46:02 +11:00
dd443bacb8
Chain exceptions while unwinding 2022-11-13 19:53:23 -06:00
f3169246ba
Implement chained exceptions
This adds the __cause__, __context__ and __suppress_context__
members to exception objects and makes e.g., `raise exc from cause`
set them in the same way as standard Python.
2022-11-13 19:52:50 -06:00
Paul Sokolovsky
ab2594e341 tests: Add test for exception-chaining raise syntax. 2015-09-01 10:39:11 +03:00