Download Shareware and Freeware Software for Windows, Linux, Macintosh, PDA

line Home  |  About Us  |  Link To Us  |  FAQ  |  Contact

Serving Software Downloads in 956 Categories, Downloaded 50.477.945 Times

Exception::Class::TryCatch 1.10

  Date Added: April 15, 2010  |  Visits: 844

Exception::Class::TryCatch

Report Broken Link
Printer Friendly Version


Product Homepage
Download (88 downloads)

Exception::Class::TryCatch is a syntactic try/catch sugar for use with Exception::Class. SYNOPSIS use Exception::Class::TryCatch; # simple usage of catch() eval { Exception::Class::Base->throw(error) }; catch my $err and warn $err->error; # catching only certain types or else rethrowing eval { Exception::Class::Base::SubClass->throw(error) }; catch( my $err, [Exception::Class::Base, Other::Exception] ) and warn $err->error; # catching and handling different types of errors eval { Exception::Class::Base->throw(error) }; if ( catch my $err ) { $err->isa(this) and do { handle_this($err) }; $err->isa(that) and do { handle_that($err) }; } # use "try eval" to push exceptions onto a stack to catch later try eval { Exception::Class::Base->throw(error) }; do { # cleanup that might use "try/catch" again }; catch my $err; # catches a matching "try" Exception::Class::TryCatch provides syntactic sugar for use with Exception::Class using the familiar keywords try and catch. Its primary objective is to allow users to avoid dealing directly with $@ by ensuring that any exceptions caught in an eval are captured as Exception::Class objects, whether they were thrown objects to begin with or whether the error resulted from die. This means that users may immediately use isa and various Exception::Class methods to process the exception. In addition, this module provides for a method to push errors onto a hidden error stack immediately after an eval so that cleanup code or other error handling may also call eval without the original error in $@ being lost. Inspiration for this module is due in part to Dave Rolskys article "Exception Handling in Perl With Exception::Class" in The Perl Journal (Rolsky 2004). The try/catch syntax used in this module does not use code reference prototypes the way the Error.pm module does, but simply provides some helpful functionality when used in combination with eval. As a result, it avoids the complexity and dangers involving nested closures and memory leaks inherent in Error.pm (Perrin 2003). Rolsky (2004) notes that these memory leaks may not occur in recent versions of Perl, but the approach used in Exception::Class::TryCatch should be safe for all versions of Perl as it leaves all code execution to the eval in the current scope, avoiding closures altogether..

Requirements: No special requirements
Platforms: Linux
Keyword: Catch Err Error Eval Exceptionclasstrycatch Libraries Programming Sugar Syntactic Trycatch
Users rating: 0/10

License: Freeware Size: 15.36 KB
EXCEPTION::CLASS::TRYCATCH RELATED
Libraries  -  libgpg-error 1.4
libgpg-error package contains common error codes and error handling functions used by GnuPG, Libgcrypt, GPGME and more packages. Installation: Please read the file INSTALL! Here is a quick summary: 1) Check that you have unmodified...
614.4 KB  
Libraries  -  Net::DBus::Error 0.33.4
Net::DBus::Error is a Perl module with error details for remote method invocation. SYNOPSIS package Music::Player::UnknownFormat; use base qw(Net::DBus::Error); # Define an error type for unknown track encoding type # for a music player...
94.21 KB  
Libraries  -  DAEMon Raco Libraries 0.3
DAEMon Raco Libraries (DRLibs) is a collection of useful functions, objects, and routines for C++. Whats New in This Release: - This release adds new libraries to manage object lists: doublelist.dr.h, simplelist.dr.h, and sortedlist.dr.h..
28.67 KB  
Libraries  -  LWJGL 0.99
LWJGL (Lightweight Java Game Library) is a solution aimed directly at professional and amateur Java programmers alike to enable commercial quality games to be written in Java. LWJGL provides developers access to high performance crossplatform...
1.3 MB  
Libraries  -  Persistent::mSQL 0.50
Persistent::mSQL is a persistent class implemented using a mSQL database. SYNOPSIS use Persistent::mSQL; use English; # import readable variable names like $EVAL_ERROR eval { ### in case an exception is thrown ### ### allocate a...
10.24 KB  
Libraries  -  Persistent::Sybase 0.50
Persistent::Sybase is a persistent class implemented using a Sybase database. SYNOPSIS use Persistent::Sybase; use English; # import readable variable names like $EVAL_ERROR eval { ### in case an exception is thrown ### ### allocate a...
10.24 KB  
Libraries  -  Persistent::Oracle 0.50
Persistent::Oracle is a persistent class implemented using an Oracle database. SYNOPSIS use Persistent::Oracle; use English; # import readable variable names like $EVAL_ERROR eval { ### in case an exception is thrown ### ### allocate a...
11.26 KB  
Libraries  -  Persistent::MySQL 0.50
Persistent::MySQL is a persistent class implemented using a MySQL database. SYNOPSIS use Persistent::MySQL; use English; # import readable variable names like $EVAL_ERROR eval { ### in case an exception is thrown ### ### allocate a...
10.24 KB  
Libraries  -  Persistent::LDAP 0.50
Persistent::LDAP is a persistent class implemented using a LDAP directory. SYNOPSIS use Persistent::LDAP; use English; # import readable variable names like $EVAL_ERROR eval { ### in case an exception is thrown ### ### allocate a...
15.36 KB  
Libraries  -  Adobe Source Libraries 1.0.29
The Adobe Source Libraries (ASL) are a collection of C++ libraries building foundation technology to allow the construction of commercial applications by assembling generic algorithms through declarative descriptions. Whats New in This Release:...
8.2 MB  
NEW DOWNLOADS IN PROGRAMMING, LIBRARIES
Programming  -  Cedalion for Linux 0.2.6
Cedalion is a programming language that allows its users to add new abstractions and define (and use) internal DSLs. Its innovation is in the fact that it uses projectional editing to allow the new abstractions to have no syntactic limitations.
471.04 KB  
Programming  -  Math::GMPf 0.29
Math::GMPf - perl interface to the GMP library's floating point (mpf) functions.
30.72 KB  
Programming  -  Net::Wire10 1.08
Net::Wire10 is a Pure Perl connector that talks to Sphinx, MySQL and Drizzle servers. Net::Wire10 implements the low-level network protocol, alias the MySQL wire protocol version 10, necessary for talking to one of the aforementioned...
30.72 KB  
Programming  -  logilab-common 0.56.2
a bunch of modules providing low level functionnalities shared among some python projects devel Please note that some of the modules have some extra dependencies. For instance, logilab.common.db will require a db-api 2.0 compliant...
174.08 KB  
Programming  -  OpenSSL for linux 1.0.0a
The OpenSSL Project is a collaborative effort to develop a robust, commercial-grade, full-featured, and Open Source toolkit implementing the Secure Sockets Layer (SSL v2/v3) and Transport Layer Security (TLS v1) protocols as well as a...
3.83 MB  
Libraries  -  wolfSSL 4.0.0
The wolfSSL embedded SSL/TLS library is a lightweight SSL library written in ANSI standard C and targeted for embedded and RTOS environments - primarily because of its small size, speed, and feature set. It is commonly used in standard operating...
3.88 MB  
Libraries  -  EuGTK 4.8.9
Makes it easy to develop good- looking, fast, cross-platform programs that run on Linux, OS X, and Windows. Euphoria is a very fast interpreted/compiled language with straight-forward syntax. EuGTK allows programming in a clean, object-oriented...
10.68 MB  
Libraries  -  Linux User Group Library Manager 1.0
The LUG Library Manager is a project to help Linux User Groups start their own library. A LUG library is helpful to the community at large because it increases access to information, and gives everyone the opportunity to become more knowledgeable.
5.35 KB  
Libraries  -  Module::MakefilePL::Parse 0.12
Module::MakefilePL::Parse is a Perl module to parse required modules from Makefile.PL. SYNOPSIS use Module::MakefilePL::Parse; open $fh, Makefile.PL; $parser = Module::MakefilePL::Parse->new( join("", ) ); $info = $parser->required;...
8.19 KB  
Libraries  -  sqlpp 0.06
sqlpp Perl package is a SQL preprocessor. sqlpp is a conventional cpp-alike preprocessor taught to understand SQL ( PgSQL, in particular) syntax specificities. In addition to the standard #define/#ifdef/#else/#endif cohort, provides also...
10.24 KB