diff --git a/collects/db/private/generic/functions.rkt b/collects/db/private/generic/functions.rkt index cd97ec6b20..7e9df49cb2 100644 --- a/collects/db/private/generic/functions.rkt +++ b/collects/db/private/generic/functions.rkt @@ -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)))) diff --git a/collects/db/scribblings/query.scrbl b/collects/db/scribblings/query.scrbl index 60e4098e62..55cf815b34 100644 --- a/collects/db/scribblings/query.scrbl +++ b/collects/db/scribblings/query.scrbl @@ -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.