Class::ErrorHandler - Base class for error handling https://www.cpan.org/
Go to file
2024-01-06 08:40:46 +01:00
perl-Class-ErrorHandler.spec automatic version update by autodist [release 0.04-1mamba;Sun May 16 2021] 2024-01-06 08:40:46 +01:00
README.md automatic update by autodist [release 0.03-1mamba;Sun Dec 15 2013] 2024-01-06 08:40:45 +01:00

perl-Class-ErrorHandler

Class::ErrorHandler provides an error-handling mechanism that's generic enough to be used as the base class for a variety of OO classes. Subclasses inherit its two error-handling methods, error and errstr, to communicate error messages back to the calling program.

On failure (for whatever reason), a subclass should call error and return to the caller; error itself sets the error message internally, then returns undef. This has the effect of the method that failed returning undef to the caller. The caller should check for errors by checking for a return value of undef, and calling errstr to get the value of the error message on an error.