String exceptionMessage(Exception e)
Arguments
e: The caughtException
Usage
Return the error message in an Exception. This is useful for determining the exception caught by a catch-all clause, but it is preferable to catch Exceptions by name.
try {
functionThatMayGoWrong(a,b,c);
} catch(e) {
putStrLn("Something went wrong: "+exceptionMessage(e));
}