Improving stack trace in the case of unexpected exception.