Clownfish::Err - Exception.
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: $@"; } }
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.
$err->cat_mess($mess);
Concatenate the supplied argument onto the error message.
my $string = $err->get_mess();
Return the error message.
Clownfish::Err isa Clownfish::Obj.
Copyright © 2010-2015 The Apache Software Foundation, Licensed under the
Apache License, Version 2.0.
Apache Lucy, Lucy, Apache, the Apache feather logo, and the Apache Lucy project logo are trademarks of The
Apache Software Foundation. All other marks mentioned may be trademarks or registered trademarks of their
respective owners.