WWW::Postini::Exception - Enhanced exception class


WWW-Postini documentation  | view source Contained in the WWW-Postini distribution.

Index


NAME

Top

WWW::Postini::Exception - Enhanced exception class

SYNOPSIS

Top

  use WWW::Postini::Exception;
  throw WWW::Postini::Exception('The sky is falling!');

DESCRIPTION

Top

Based on Exception::Class, this module adds support for recursive exception throwing. This permits exceptions to be caused by other exceptions, in a way very similar to Java's exceptions.

OBJECT METHODS

Top

throw($arg)
throw(%args)

Creates a new WWW::Postini::Exception object and die()s with it. If $arg is an instance of Exception::Class::Base, either directly or by way of subclassing, $arg will be set as the cause of the existing exception object.

Alternatively, if %args is passed with a cause attribute, that value will be set to the cause of the exception object.

For all other parameter-passing conventions of the throw() method, please refer to Exception::Class.

cause()
cause($object)

Get or set the cause of the exception.

Returns the exception object that caused the current exception. If $object is set, the original exception's cause is updated to reflect the new value.

SEE ALSO

Top

WWW::Postini, Exception::Class

AUTHOR

Top

Peter Guzis, <pguzis@cpan.org>

COPYRIGHT AND LICENSE

Top


WWW-Postini documentation  | view source Contained in the WWW-Postini distribution.