File::DataClass::Exception - Exception base class
0.8.$Revision: 351 $
use Moose; use Try::Tiny; extend qw(File::DataClass::Schema); sub some_method { my $self = shift; try { this_will_fail } catch { $self->throw( $_ ) }; }
An exception class that inherits from a custom subclass of Exception::Class
Create an exception object. You probably do not want to call this directly, but indirectly through "catch" and "throw"
$e = File::DataClass::Exception->catch( $error );
Catches and returns a thrown exception or generates a new exception if EVAL_ERROR has been set
$printable_string = $e->full_message
What an instance of this class stringifies to
$lines = $e->stacktrace( $num_lines_to_skip );
Return the stack trace. Defaults to skipping one (the first) line of output
File::DataClass::Exception->throw( $error );
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
File::DataClass::Exception->throw_on_error $error );
Calls "catch" and if the was an exception "throw"s it
None
The $IGNORE package variable is list of methods whose presence should be suppressed in the stack trace output
$IGNORE
There are no known incompatibilities in this module
The default ignore package list should be configurable
There are no known bugs in this module. Please report problems to the address below. Patches are welcome
Peter Flanigan <Support at RoxSoft.co.uk>
<Support at RoxSoft.co.uk>
Copyright (c) 2012 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
To install File::DataClass, copy and paste the appropriate command in to your terminal.
cpanm
cpanm File::DataClass
CPAN shell
perl -MCPAN -e shell install File::DataClass
For more information on module installation, please visit the detailed CPAN module installation guide.