Unwind the stack when handling transaction errors
As this avoids trying to suspend while the stack is in a unpredictable state.
This commit is contained in:
parent
14de1667b1
commit
97a01853b8
1 changed files with 3 additions and 1 deletions
|
|
@ -216,13 +216,15 @@
|
|||
(lambda ()
|
||||
(exec-query conn "ROLLBACK;"))
|
||||
#:unwind? #t)
|
||||
;; TODO Include the stack in the exception via knots
|
||||
(raise-exception exn))
|
||||
(lambda ()
|
||||
(let ((result (f conn)))
|
||||
(exec-query conn (if always-rollback?
|
||||
"ROLLBACK;"
|
||||
"COMMIT;"))
|
||||
result))))
|
||||
result))
|
||||
#:unwind? #t))
|
||||
|
||||
(define (check-test-database! conn)
|
||||
(match (exec-query conn "SELECT current_database()")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue