Egg::Exception - Exception module for Egg.
use Egg::Exception; Egg::Error->throw('The error occurs.'); sub run { my($e)= @_; local $SIG{__DIE__}= sub { Egg::Error->throw(@_) }; eval { $e->call_method; }; if ($@) { print STDERR "stack: ". $@->stacktrace; } }
This is a module to treat the exception handling.
Egg::Exception doesn't have the method. Please call the method of Egg::Error.
Constructor.
It processes it by Devel::StackTrace.
After the exception message is thrown to the constructor, die is done.
Egg::Error->throw( 'internal error.' );
The stack trace that has accumulated is output.
local $SIG{__DIE__}= sub { Egg::Error->throw(@_) }; eval{ ... code. }; if ($@) { die $@->stacktrace }
Devel::StackTrace, Egg::Release,
Masatoshi Mizuno, <lushe@cpan.org>
Copyright (C) 2007 Bee Flag, Corp. <http://egg.bomcity.com/>, All Rights Reserved.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.6 or, at your option, any later version of Perl 5 you may have available.
To install Egg::Release, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Egg::Release
CPAN shell
perl -MCPAN -e shell install Egg::Release
For more information on module installation, please visit the detailed CPAN module installation guide.