# CGI::Session::ErrorHandler - error handling routines for CGI::Session - perldoc - [phpMan]

## NAME
    [CGI::Session::ErrorHandler](https://www.chedong.com/phpMan.php/perldoc/CGI%3A%3ASession%3A%3AErrorHandler/markdown) - error handling routines for [CGI::Session](https://www.chedong.com/phpMan.php/perldoc/CGI%3A%3ASession/markdown)

## SYNOPSIS
        require [CGI::Session::ErrorHandler](https://www.chedong.com/phpMan.php/perldoc/CGI%3A%3ASession%3A%3AErrorHandler/markdown);
        @ISA = qw( [CGI::Session::ErrorHandler](https://www.chedong.com/phpMan.php/perldoc/CGI%3A%3ASession%3A%3AErrorHandler/markdown) );

        sub some_method {
            my $self = shift;
            unless (  $some_condition ) {
                return $self->set_error("some_method(): \$some_condition isn't met");
            }
        }

## DESCRIPTION
    [CGI::Session::ErrorHandler](https://www.chedong.com/phpMan.php/perldoc/CGI%3A%3ASession%3A%3AErrorHandler/markdown) provides set_error() and errstr() methods for setting and accessing
    error messages from within [CGI::Session](https://www.chedong.com/phpMan.php/perldoc/CGI%3A%3ASession/markdown)'s components. This method should be used by driver
    developers for providing [CGI::Session](https://www.chedong.com/phpMan.php/perldoc/CGI%3A%3ASession/markdown)-standard error handling routines for their code

  METHODS
### set_error
        Implicitly defines $[pkg_name::errstr](https://www.chedong.com/phpMan.php/perldoc/pkgname%3A%3Aerrstr/markdown) and sets its value to $message. Return value is always
        undef.

### errstr
        Returns whatever value was set by the most recent call to set_error(). If no message as has
        been set yet, the empty string is returned so the message can still concatenate without a
        warning.

## LICENSING
    For support and licensing information see [CGI::Session](https://www.chedong.com/phpMan.php/perldoc/CGI%3A%3ASession/markdown).

