Checking for active transaction when an unhandled exception was raised.
Rolling back that transaction so the thread is not "lost" an can be used
normally from that point again.
Improved exception handling.