jax
3f8aaabb - Interrupt lu transformation generators whenever an exception occurs

Commit
5 years ago
Interrupt lu transformation generators whenever an exception occurs This fixes some errors that have been appearing in our CI from time to time. All transformations are implemented as generators, but they haven't been explicitly aborted when an exception has been raised. Instead, they only got closed when they got garbage collected, which could happen at an unspecified later time, potentially leading to a corruption of global state, which could have been modified after the exception was handled. Note that this implementation doesn't propagate the original exception into the argument transformations, and doesn't allow them to handle the error either. Such an extension would be possible, but throwing an exception into a generator mutates the exception object, clobbering the nice traceback that we would usually carry. One can work around those issues, but it feels really hacky and we don't need it right now anyway, so I figured we'll be better off with the simple thing for the time being.
Author
Committer
Parents
Loading