Use sm_decrementer to remove another explicit try/catch
This commit is contained in:
parent
61a6db080d
commit
d3d42c5f54
@ -39,18 +39,11 @@ transaction_manager::write_ref
|
||||
transaction_manager::new_block(validator v)
|
||||
{
|
||||
block_address b = sm_->new_block();
|
||||
try {
|
||||
sm_decrementer decrementer(sm_, b);
|
||||
write_ref wr = bm_->write_lock_zero(b, v);
|
||||
add_shadow(b);
|
||||
try {
|
||||
return bm_->write_lock_zero(b, v);
|
||||
} catch (...) {
|
||||
remove_shadow(b);
|
||||
throw;
|
||||
}
|
||||
} catch (...) {
|
||||
sm_->dec(b);
|
||||
throw;
|
||||
}
|
||||
decrementer.dont_bother();
|
||||
return wr;
|
||||
}
|
||||
|
||||
// FIXME: make exception safe
|
||||
|
Loading…
Reference in New Issue
Block a user