When @transaction rolls back, log the name of the called method.

This commit is contained in:
voussoir 2020-09-17 18:33:56 -07:00
parent 4c9668c920
commit 26b9371f26

View file

@ -86,8 +86,8 @@ def transaction(method):
try:
result = method(self, *args, **kwargs)
except Exception as e:
photodb.log.debug(e)
except Exception as exc:
photodb.log.debug(f'{method} raised {repr(exc)}')
photodb.rollback(savepoint=savepoint_id)
raise