use different exception handler if transaction-type is local

fixes #4160