Return the exception type on an unhandled exception.

This matches the behaviour of xsim.