use different exception handler if transaction-type is local

back-port of https://github.com/hazelcast/hazelcast/pull/4164