use different exception handler if transaction-type is local [master]

fixes #4160