Name

IPC::SRLock::ExceptionClass - Exception base class

Version

0.1.$Revision: 23 $

Synopsis

Description

Implements try (by way of an eval), throw, and catch error semantics. Inherits from Exception::Class

Subroutines/Methods

catch

Catches and returns a thrown exception or generates a new exception if EVAL_ERROR has been set

as_string

warn $e->as_string( $verbosity, $offset );

Serialize the exception to a string. The passed parameters; verbosity and offset determine how much output is returned

The verbosity parameter can be:

  1. The default value. Only show a stack trace if c<$me->show_trace> is true

  2. Always show the stack trace and start at frame offset which defaults to 1. The stack trace stops when the first duplicate output line is detected

  3. Always shows the complete stack trace starting at frame 0

throw

Create (or re-throw) an exception to be caught by the catch above. If the passed parameter is a reference it is re-thrown. If a single scalar is passed it is taken to be an error message code, a new exception is created with all other parameters taking their default values. If more than one parameter is passed the it is treated as a list and used to instantiate the new exception. The error parameter must be provided in this case

Diagnostics

None

Configuration and Environment

The $IGNORE package variable is list of methods whose presence should be suppressed in the stack trace output

Dependencies

Exception::Class
List::Util
Readonly

Incompatibilities

There are no known incompatibilities in this module

Bugs and Limitations

There are no known bugs in this module. The default ignore package list should be configurable. Please report problems to the address below. Patches are welcome

Author

Peter Flanigan, <Support at RoxSoft.co.uk>

License and Copyright

Copyright (c) 2008 Peter Flanigan. All rights reserved

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See perlartistic

This program is distributed in the hope that it will be useful, but WITHOUT WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE