Catch exceptions on transactions