NAME

Fault::ErrorHandler.pm - A base error handler class

SYNOPSIS

use Fault::ErrorHandler;
$class_object = Fault::ErrorHandler->new;
$flg          = Fault::ErrorHandler->warn ($msg);
$flg          = $class_object->warn       ($msg);
                Fault::ErrorHandler->die  ($msg);
                $class_object->die        ($msg);

Inheritance

Base Class

Description

This Class does not have instance objects, only a single 'Class Object'. It is always referenced under the Class name. This makes it very easy for code at any level or location within a system to send error messages in a predetermined manner. While this particular class is just a cover for Perl warn and die, one could subclass it to do just about anything..

At the moment this class may seem trivial, however the intention is to add code that will detect and use other methods of warn and die, such as Gtk dialog panels, if they are present. I will impliment that when I find my round tuit(*)

* Round tuits were invented by Paula Shubock of CMU in the early 1980's. The first was a yellow circle with a centered calligraphic 'tuit'!

Examples

use Fault::ErrorHandler;
my $classobj      = Fault::ErrorHandler->new;
my $didwarn       = Fault::ErrorHandler->warn ("Dont do that!");
my $didwarn       = $classobj->warn           ("Stop it!");
                    Fault::ErrorHandler->die  ("ARRRGGH!!!");
                    $classobj->die            ("R.I.P");

Instance Variables

None.

Class Methods

$class_object = Fault::ErrorHandler->new

Generate the ErrorHandler object if it doesn't exist; otherwise just return the existing class object.

$flg = Fault::ErrorHandler->warn ($msg)
$flg = $class_object->warn ($msg)

Issue the specified warning message and return true if successful. If there is no message, it prints "<Null warning message>".

Fault::ErrorHandler->die ($msg)
$class_object->die ($msg)

Issue the specified die message and then commit hari-kari. If there is no message, it prints "<Null warning message>".

Instance Methods

None.

Private Class Methods

None.

Private Instance Methods

None.

SEE ALSO

None.

AUTHOR

Dale Amon <amon@vnl.com>

1 POD Error

The following errors were encountered while parsing the POD:

Around line 123:

=back doesn't take any parameters, but you said =back 4