Cancel transaction after exception in #wait.