Name
File::DataClass::TraitFor::ThrowingExceptions - Detects and throws exceptions
Synopsis
use Moose;
with 'File::DataClass::TraitFor::ThrowingExceptions';
Version
This documents version v0.1.$Rev: 450 $ of File::DataClass::TraitFor::ThrowingExceptions
Description
Detects and throws exceptions
Configuration and Environment
Defines no attributes
Subroutines/Methods
caught
$self = $class->caught( [ @args ] );
Catches and returns a thrown exception or generates a new exception if $EVAL_ERROR
has been set. Returns either an exception object or undef
throw
$class->throw error => 'Path [_1] not found', args => [ 'pathname' ];
Create (or re-throw) an exception. If the passed parameter is a blessed reference it is re-thrown. If a single scalar is passed it is taken to be an error message, 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
throw_on_error
$class->throw_on_error( [ @args ] );
Calls "caught" passing in the options @args
and if there was an exception "throw"s it
Diagnostics
None
Dependencies
Incompatibilities
There are no known incompatibilities in this module
Bugs and Limitations
There are no known bugs in this module. Please report problems to the address below. Patches are welcome
Acknowledgements
Larry Wall - For the Perl programming language
Author
Peter Flanigan, <pjfl@cpan.org>
License and Copyright
Copyright (c) 2013 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