From c229439decd00aa3aad2ef807e80bf215450f27e Mon Sep 17 00:00:00 2001 From: Steven Schveighoffer Date: Mon, 6 Jun 2016 15:13:42 -0400 Subject: [PATCH] Add description of rollback without throwing error --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index f539321e3..1290da824 100644 --- a/README.md +++ b/README.md @@ -1060,7 +1060,7 @@ try dbQueue.inTransaction { db in } ``` -The transaction is rollbacked if an error is thrown within the transaction body, and that error is rethrown by the inTransaction method. +The transaction is rollbacked if an error is thrown within the transaction body, and that error is rethrown by the inTransaction method. If you return `TransactionCompletion.Rollback` from your closure, the transaction is also rolled back, but no error is thrown. If you want to insert a transaction between other database statements, you can use the Database.inTransaction() function: