Concurrent-Object

 view release on metacpan or  search on metacpan

lib/Concurrent/Errorhandler.pm  view on Meta::CPAN


Concurrent::Errorhandler - Error handling mechanism for Concurrent.

=head1 SYNOPSIS

    package Foo;

    use Concurrent::Errorhandler;
    @ISA = qw(Concurrent::Errorhandler);
    
    sub alive { 
        ..
        ..
        return 
        $self->error ("Awake, awake! Ring the alarum bell. \
                       Murther and treason!", $dagger) 
            if $self->murdered($king);
    }


    package main; 

    use Foo;
    my $foo = new Foo;
    $foo->alive($king) or print $foo->errstr(); 
        # prints "Awake, awake! ... "

=head1 DESCRIPTION 

Concurrent::Errorhandler encapsulates the error handling mechanism used
by the modules in Concurrent bundle. Concurrent::Errorhandler doesn't
have a constructor and is meant to be inherited. The derived modules use
its two methods, error() and errstr(), to communicate error messages to
the caller.



( run in 1.287 second using v1.01-cache-2.11-cpan-39bf76dae61 )