diff options
| author | Daniel Schadt <kingdread@gmx.de> | 2025-12-29 17:08:01 +0100 |
|---|---|---|
| committer | Daniel Schadt <kingdread@gmx.de> | 2025-12-29 17:08:01 +0100 |
| commit | 0a702bcdcd81bae0d05d029b15430ee5861b3277 (patch) | |
| tree | ecf90da1b38e445672d069e987348c594bbd74c9 | |
| parent | aab0428c54cb742058de5bae72276f720e89f980 (diff) | |
| download | fietsboek-0a702bcdcd81bae0d05d029b15430ee5861b3277.tar.gz fietsboek-0a702bcdcd81bae0d05d029b15430ee5861b3277.tar.bz2 fietsboek-0a702bcdcd81bae0d05d029b15430ee5861b3277.zip | |
better logging of exceptions during rollback
| -rw-r--r-- | fietsboek/fstrans.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/fietsboek/fstrans.py b/fietsboek/fstrans.py index c68ca48..13b0018 100644 --- a/fietsboek/fstrans.py +++ b/fietsboek/fstrans.py @@ -278,12 +278,19 @@ class Transaction: def undo(self): """Undo all actions that have already been applied.""" + # pylint: disable=broad-exception-caught for action in reversed(self.actions_done): LOGGER.debug("Undoing %s", action) try: action.undo() except Exception as exc_inner: - LOGGER.debug("Exception ignored: %s", exc_inner) + # Hide "during the handling of ... another exception occurred" + exc_inner.__context__ = None + LOGGER.exception( + "Exception ignored during rollback of %s", + action, + exc_info=exc_inner, + ) def commit(self, _trans): """Commit this transaction. |
