-
-
27 Feb 2018 08:38:55 UTC
- Distribution: Clownfish
- Source (raw)
- Browse (raw)
- Changes
- Homepage
- How to Contribute
- Clone repository
- Issues
- Testers (1313 / 0 / 7)
- Kwalitee
Bus factor: 0- License: apache_2_0
- Perl: v5.8.3
- Activity
24 month- Tools
- Download (230.31KB)
- MetaCPAN Explorer
- Permissions
- Subscribe to distribution
- Permalinks
- This version
- Latest version
and 1 contributors- The Apache Lucy Project <dev at lucy dot apache dot org>
- Dependencies
- unknown
- Reverse dependencies
- CPAN Testers List
- Dependency graph
NAME
Clownfish::Err - Exception.
SYNOPSIS
package MyErr; use base qw( Clownfish::Err ); ... package main; use Scalar::Util qw( blessed ); while (1) { eval { do_stuff() or MyErr->throw("retry"); }; if ( blessed($@) and $@->isa("MyErr") ) { warn "Retrying...\n"; } else { # Re-throw. die "do_stuff() died: $@"; } }
DESCRIPTION
Clownfish::Err is the base class for exceptions in the Clownfish object hierarchy.
The Err module also provides access to a per-thread Err shared variable via set_error() and get_error(). It may be used to store an Err object temporarily, so that calling code may choose how to handle a particular error condition.
METHODS
cat_mess
$err->cat_mess($mess);
Concatenate the supplied argument onto the error message.
get_mess
my $string = $err->get_mess();
Return the error message.
INHERITANCE
Clownfish::Err isa Clownfish::Obj.
Module Install Instructions
To install Clownfish, copy and paste the appropriate command in to your terminal.
cpanm Clownfish
perl -MCPAN -e shell install Clownfish
For more information on module installation, please visit the detailed CPAN module installation guide.