I'm using exceptions in my plugin.
function foo() {
// Some code.
throw new Exception( 'Division by 0' );
// Code continued.
}
try {
echo foo();
} catch ( Exception $e ) {
}
I'm aware $e->getMessage()
will give me the caught exception's message, but in the absence of a notifications API, what is the recommended way to display this message to the user on the front-end?