Main > Programming > Libraries >

Exception::Base 0.07

Exception::Base 0.07

Sponsored Links

Exception::Base 0.07 Ranking & Summary

RankingClick at the star to rank
Ranking Level
User Review: 0 (0 times)
File size: 0.023 MB
Platform: Any Platform
License: Perl Artistic License
Price:
Downloads: 887
Date added: 2007-05-23
Publisher: Piotr Roszatycki

Exception::Base 0.07 description

Exception::Base is a Perl module with lightweight exceptions.
SYNOPSIS
# Use module and create needed exceptions
use Exception::Base (
Exception::IO,
Exception::FileNotFound => { message => File not found,
isa => Exception::IO },
);
# try / catch
try Exception eval {
do_something() or throw Exception::FileNotFound
message=>Something wrong,
tag=>something;
};
# Catch the Exception::Base, other exceptions throw immediately
if (catch Exception::Base my $e) {
# $e is an exception object for sure, no need to check if is blessed
if ($e->isa(Exception::IO)) { warn "IO problem"; }
elsif ($e->isa(Exception::Die)) { warn "eval died"; }
elsif ($e->isa(Exception::Warn)) { warn "some warn was caught"; }
elsif ($e->with(tag=>something)) { warn "something happened"; }
elsif ($e->with(qr/^Error/)) { warn "some error based on regex"; }
else { $e->throw; } # rethrow the exception
}
# the exception can be thrown later
$e = new Exception::Base;
$e->throw;
# try with array context
@v = try Exception::Base [eval { do_something_returning_array(); }];
# use syntactic sugar
use Exception::Base qw , Exception::IO;
try eval {
throw Exception::IO;
}; # dont forget about semicolon
catch my $e, [Exception::IO]; # Exception::Base is by default
This class implements a fully OO exception mechanism similar to Exception::Class or Class::Throwable. It does not depend on other modules like Exception::Class and it is more powerful than Class::Throwable. Also it does not use closures as Error and does not polute namespace as Exception::Class::TryCatch. It is also much faster than Exception::Class.
Main features:
- fast implementation of an exception object
- fully OO without closures and source code filtering
- does not mess with $SIG{__DIE__} and $SIG{__WARN__}
- no external modules dependencies, requires core Perl modules only
- implements error stack, the try/catch blocks can be nested
- shows full backtrace stack on die by default
- the default behaviour of exception class can be changed globally or just for the thrown exception
- the exception can be created with defined custom properties
- matching the exception by class, message or custom properties
- matching with string, regex or closure function
- creating automatically the derived exception classes ("use" interface)
- easly expendable, see Exception::System class for example

Exception::Base 0.07 Screenshot

Advertisements

Exception::Base 0.07 Keywords

Bookmark Exception::Base 0.07

Hyperlink code:
Link for forum:

Exception::Base 0.07 Copyright

WareSeeker periodically updates pricing and software information of Exception::Base 0.07 full version from the publisher, so some information may be slightly out-of-date. You should confirm all information before relying on it. Software piracy is theft, Using crack, password, serial numbers, registration codes, key generators is illegal and prevent future development of Exception::Base 0.07 Edition. Download links are directly from our publisher sites, torrent files or links from rapidshare.com, yousendit.com or megaupload.com are not allowed

Allok Video Splitter 2.2.0 Review:

Name (Required)
Email(Required)
Captcha
Featured Software

Want to place your software product here?
Please contact us for consideration.

Contact WareSeeker.com
Related Software
Exception::Class is a Perl module that allows you to declare real exception classes in Perl. Free Download
Bio::NEXUS::Functions is a Perl module that provides private utility functions for the module. Free Download
Text::Emoticon::GoogleTalk is a Perl module emoticon filter of GoogleTalk. Free Download
Net::AudioScrobbler is a Perl module that provides an interface to AudioScrobbler. Free Download
XBase::FAQ is a Perl module with frequently asked questions about the XBase.pm/DBD::XBase modules. Free Download
Tk::SlideShow is a Tk Perl module for building slide-like presentations. Free Download
Pod::Template is a Perl module for building pod documentation from templates. Free Download
Test::Perl::Critic is a Perl module use Perl::Critic in test programs. Free Download