Return the exception message of an exception. If no exception was thrown, then a new exception is thrown to notify the user of the missing exception.
assert(getExceptionMsg({ throw new Exception("my message"); }()) == "my message"); assert(getExceptionMsg({ }()).getExceptionMsg == "Error: No exception was thrown.");
See Implementation
Return the exception message of an exception. If no exception was thrown, then a new exception is thrown to notify the user of the missing exception.