Big Sister Web Application Framework
List of all members
BigSWAF::Exception Class Reference

Implements more Java-like exceptions on top of Perl exceptions using die() and eval{}. More...

Inheritance diagram for BigSWAF::Exception:
BigSWAF::DisplayableException

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.

Detailed Description

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.

Member Function Documentation

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()).

Parameters
argumentsa reference to a list of arguments
Returns
a reference to the list of arguments
scalar BigSWAF::Exception::message ( )

Get the text associated with the exception.

This text is identical to the first argument of arguments().

Returns
message text
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();


The documentation for this class was generated from the following file: