Skip to content

Commit

Permalink
reset _slate in __exit__ in any case
Browse files Browse the repository at this point in the history
  • Loading branch information
pfackeldey committed Dec 15, 2024
1 parent 563342e commit 7de3767
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/awkward/_errors.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,9 @@ def __exit__(self, exception_type, exception_value, traceback):
and issubclass(exception_type, Exception)
and self.primary() is self
):
# Step out of the way so that another ErrorContext can become primary.
# Is this necessary to do here? (We're about to raise an exception anyway)
self._slate.__dict__.clear()
# Handle caught exception
raise self.decorate_exception(exception_type, exception_value) from exception_value
else:
Expand Down

0 comments on commit 7de3767

Please sign in to comment.