diff --git a/src/awkward/_errors.py b/src/awkward/_errors.py index 9cd5891607..e3c630013f 100644 --- a/src/awkward/_errors.py +++ b/src/awkward/_errors.py @@ -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: