Option | Default |
---|---|
message | <required> |
reason | <required> |
report_opts | {} |
Returns whether this exception has a severity which makes it fatal when thrown. See Log::Report::isFatal().
if($ex->isFatal) { $ex->throw(reason => 'ALERT') } else { $ex->throw }
Change the MESSAGE of the exception, must be a Log::Report::Message object.
When you use a Log::Report::Message
object, you will get a new one
returned. Therefore, if you want to modify the message in an exception,
you have to re-assign the result of the modification.
$e->message->concat('!!')); # will not work! $e->message($e->message->concat('!!')); $e->message(__x"some message {msg}", msg => $xyz);
Check whether any of the classes listed in the message match CLASS (string) or the REGEX. This uses Log::Report::Message::inClass().
Insert the message contained in the exception into the currently
defined dispatchers. The throw
name is commonly known
exception related terminology for report
.
The OPTIONS overrule the captured options to Log::Report::report(). This can be used to overrule a destination. Also, the reason can be changed.
try { print {to => 'stderr'}, ERROR => 'oops!' }; $@->reportFatal(to => 'syslog'); $exception->throw(to => 'syslog'); $@->wasFatal->throw(reason => 'WARNING');