Another question: can i manually abort transaction...
# exposed
n
Another question: can i manually abort transaction from within transaction block? Other than to throw exception?
s
Have you tried
this.rollback()
?
n
Just tested it. Curious behaviour: it undoes changes, but transaction block continues executing and all operations that require transaction still execute no problem.
I was thinking something more along the lines of shortcircuiting execution, not just undoing changes. But thank you, i think between
rollback
and
commit
i can figure things out
b
Did you try
return@transaction rollback()
?