Dancer-1.3122

NAME

Dancer::Exception::Base - the base class of all Dancer exceptions

DESCRIPTION

Dancer::Exception::Base is the base class of all Dancer exception. All core exceptions, and all custom exception registered using Dancer::Exception::register_exception inherits of Dancer::Exception::Base.

METHODS

throw

Throws an exception. It's what raise (from Dancer::Exception) uses. Any arguments is set as raising parameters. You should not use this method directly, but instead, use raise from Dancer::Exception.

Warning, if you want to rethrow an exception, use rethrow.

rethrow

Re-throw the exception, without touching its parameters. Useful if you've caught and exception but don't want to handle it, and want to rethrow it.

message

Computes and returns the message associated to the exception. It'll apply the parameters that were set at throw time to the message pattern of the exception.

STRINGIFICATION

string overloading

All Dancer exceptions properly stringify. When evaluated to a string, they return their message, concatenated with their stack trace (see below).

cmp overloading

The cmp operator is also overloaded, thus all the string operations can be done on Dancer's exceptions, as they will all be based on the overloaded cmp operator. Dancer exceptions will be compared without their stacktraces.