[Debug] enhanced error messages for uncaught exceptions