table of contents
other versions
- stretch 0.3.3-7+b1
Lucy::Object::Err(3pm) | User Contributed Perl Documentation | Lucy::Object::Err(3pm) |
NAME¶
Lucy::Object::Err - Exception.SYNOPSIS¶
use Scalar::Util qw( blessed ); my $bg_merger; while (1) { $bg_merger = eval { Lucy::Index::BackgroundMerger->new( index => $index ); }; last if $bg_merger; if ( blessed($@) and $@->isa("Lucy::Store::LockErr") ) { warn "Retrying...\n"; } else { # Re-throw. die "Failed to open BackgroundMerger: $@"; } }
DESCRIPTION¶
Most of the time when Lucy encounters an error, it tries to raise a Lucy::Object::Err exception with an error message and context information.At present, it is only safe to catch exceptions which are specifically documented as catchable; most times when an Err is raised, Lucy leaks memory.
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.
INHERITANCE¶
Lucy::Object::Err isa Lucy::Object::Obj.2016-07-07 | perl v5.24.1 |