fix call-with-transaction error (disconnected rollback)

Also, clarify in docs that break causes disconnect.
This commit is contained in:
Ryan Culpepper 2013-05-18 10:27:16 -04:00
parent 7eaa072524
commit fe4e94184e
2 changed files with 4 additions and 1 deletions

View File

@ -291,7 +291,8 @@
(with-handlers ([exn?
(lambda (e2)
(error/exn-in-rollback 'call-with-transaction e1 e2))])
(send c end-transaction '|call-with-transaction (rollback)| 'rollback #t))
(when (send c connected?)
(send c end-transaction '|call-with-transaction (rollback)| 'rollback #t)))
(raise e1))])
(begin0 (call-with-continuation-barrier proc)
(send c end-transaction '|call-with-transaction (commit)| 'commit #t))))

View File

@ -49,6 +49,8 @@ disconnected:
@item{changing communication settings, such as changing the
connection's character encoding}
@item{communication failures and internal errors in the library}
@item{a @seclink["breakhandler" #:doc '(lib "scribblings/reference/reference.scrbl")]{break}
occurring during a connection operation}
]
See @secref["transactions"] for information on how errors can affect
the transaction status.