debian man page for razor2::errorhandler

Query: razor2::errorhandler

OS: debian

Section: 3pm

Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar

Razor2::Errorhandler(3pm)				User Contributed Perl Documentation				 Razor2::Errorhandler(3pm)

NAME
Razor::Errorhandler - Error handling mechanism for Razor.
SYNOPSIS
package Foo; use Razor::Errorhandler; @ISA = qw(Razor::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! ... "
DESCRIPTION
Razor::Errorhandler encapsulates the error handling mechanism used by the modules in Razor bundle. Razor::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. When a method of the derived module fails, it calls $self->error() and returns to the caller. The error message passed to error() is made available to the caller through the errstr() accessor. error() also accepts a list of sensitive data that it wipes out (undef'es) before returning. The caller should never call errstr() to check for errors. errstr() should be called only when a method indicates (usually through an undef return value) that an error has occured. This is because errstr() is never overwritten and will always contain a value after the occurance of first error.
METHODS
error($mesage, ($wipeme, $wipemetoo)) The first argument to error() is $message which is placed in $self->{errstr} and the remaining arguments are interpretted as variables containing sensitive data that are wiped out from the memory. error() always returns undef. errstr() errstr() is an accessor method for $self->{errstr}.
AUTHOR
Vipul Ved Prakash, <mail@vipul.net>
SEE ALSO
Razor::Client(3) perl v5.14.2 2005-08-03 Razor2::Errorhandler(3pm)
Related Man Pages
razor-agent.conf(5) - debian
errstr(2) - plan9
bsde_delete_rule(3) - freebsd
razor2::errorhandler(3) - suse
class::errorhandler(3pm) - debian
Similar Topics in the Unix Linux Community
Calabrese’s Razor Metric
Reminder for king bily: Nonsense