Hyper::Error - catch die and/or warn, offers throw method
This document describes Hyper::Error 0.02
use Hyper::Error fatal => 1, warn => 1; throw('error occured');
Hyper::Error can catch fatal (die) and warn (warn) messages. The error output for shell scripts is plain text. Errors in Webserver context drop html messages. The error messages includes the callerstack, some codelines of last called package in Hyper namespace, some environment variables, and the original message. There is also a throw exported by default to throw errors.
use Hyper::Error warn => 1, fatal => 1;
or more complex and without exported throw method
require Hyper::Error; Hyper::Error->import(warn => 1, fatal => 1, throw => 0);
Adjust signal handlers for warn and/or die and exports the throw method.
Hyper::Error::_show_error_message(qw( error_message_of_line_1 error_message_of_line_2 ));
Print errormessage (html or plaintext).
Hyper::Error::_show_source($file_name, $line_number);
Get a code snippet for file, line.
use Hyper::Error; throw('my error');
or Hyper::Error throw => 0; Hyper::Error::throw('my error');
Used for throwing failures.
Use Hyper::Singleton::Context for your configuration.
Sample for your Context.ini
[Hyper::Error] html_template=Error/html_error.htc plain_template=Error/plain_error.htc
version
autouse
Apache2::Log
Data::Dumper
HTML::Template::Compiled
File::Spec
English
Readonly
$Author: ac0v $
$Id: Error.pm 522 2008-12-18 16:05:57Z ac0v $
$Revision: 522 $
$Date: 2008-12-18 17:05:57 +0100 (Do, 18 Dez 2008) $
$HeadURL: http://svn.hyper-framework.org/Hyper/Hyper/branches/0.04/lib/Hyper/Error.pm $
Andreas Specht <ACID@cpan.org>
<ACID@cpan.org>
Copyright (c) 2007, Andreas Specht <ACID@cpan.org>. All rights reserved.
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install Hyper, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Hyper
CPAN shell
perl -MCPAN -e shell install Hyper
For more information on module installation, please visit the detailed CPAN module installation guide.