mirror of
https://github.com/martinvonz/jj.git
synced 2024-12-28 23:55:54 +00:00
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.
This commit is contained in:
parent
77bb8b600b
commit
5b8e10394d
1 changed files with 1 additions and 1 deletions
|
@ -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.");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue