Apache-iNcom

 view release on metacpan or  search on metacpan

lib/Apache/iNcom.pm  view on Meta::CPAN

=head1 ERROR HANDLING

Error are handled in a way similar to the ErrorDocument functionality.
The error profile is an file which should C<eval> to an hash
reference. Keys are error number and values are the file that should
be returned on error. The pages are assumed to be relative to the
I<INCOM_ERROR_ROOT> directory, or if unspecified the I<INCOM_ROOT>.

If a localized version of the page exists, that one will be use. The
page will be executed as a normal Apache::iNcom pages. Error are keyed
either by the HTTP response code (404,403,500, etc) or by an arbitrary
key for application specific error. In order to return an arbitrary
error, you set the pnote I<INCOM_ERROR> in the page before returning
an error.

    Example: $req_rec->pnotes( "INCOM_ERROR", "validation_failed" );
	     die "validation_failed";

The page linked to the "validation_failed" key in the error profile
will be used.



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