|
Big Sister Web Application Framework
|
Implements more Java-like exceptions on top of Perl exceptions using die() and eval{}. More...
Public Class Methods | |
| retval | new (scalar this, list arguments) |
| Create a new exception object. | |
Public Object Methods | |
| retval | throw (scalar obj_or_class, list arguments) |
| Throw an exception. | |
| scalar | message () |
| Get the text associated with the exception. | |
| arrayref | arguments (arrayref arguments) |
| Get/set the arguments associated with this exception. | |
Implements more Java-like exceptions on top of Perl exceptions using die() and eval{}.
Semantics like
throw BigSWAF::Exception( "some text" )
are supported. BigSWAF::Exception can be catched as usual with an eval {} block.
| arrayref BigSWAF::Exception::arguments | ( | arrayref | arguments | ) |
Get/set the arguments associated with this exception.
The first argument is expected to be a message (see message()).
| arguments | a reference to a list of arguments |
| scalar BigSWAF::Exception::message | ( | ) |
Get the text associated with the exception.
This text is identical to the first argument of arguments().
| retval BigSWAF::Exception::new | ( | scalar | this, |
| list | arguments | ||
| ) |
Create a new exception object.
The arguments parameter is similiar to that of arguments().
| retval BigSWAF::Exception::throw | ( | scalar | obj_or_class, |
| list | arguments | ||
| ) |
Throw an exception.
This method can be used in two flavours: If passing a BigSWAF::Exception object as the first argument this exception is thrown. If not, then throw creates a new BigSWAF::Exception object using the arguments vector and throws this one. Therefore you can use throw as in
throw BigSWAF::Exception( "short form" )
as well as in
new BigSWAF::Exception( "long form" ) -> throw();
1.8.1.2