transaction: add a message to check for unclosed transaction
I've forgotten to close a transaction a few times and while the
message ('assertion failed: self.closed') is clear to me now, it
probably won't be clear to others or to me in the future.
@@ -195,7 +195,7 @@ impl<'r> Transaction<'r> {
impl<'r> Drop for Transaction<'r> {
fn drop(&mut self) {
if !std::thread::panicking() {
- assert!(self.closed);
+ assert!(self.closed, "Transaction was dropped without being closed.");
}
}
}
