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

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

Serving Software Downloads in 976 Categories, Downloaded 29.617.102 Times

Exception::Class::TryCatch 1.10

  Date Added: April 15, 2010  |  Visits: 578


Report Broken Link
Printer Friendly Version

Product Homepage
Download (72 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 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 (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
More Reviews or Write Review

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  -  Exception::Base 0.07
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 }, ); #...
23.55 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  -  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  -  GNU Classpath 0.95
GNU Classpath (essential libraries for Java) is a project to create free core class libraries for use with virtual machines and compilers for the Java programming language. GNU Classpath project includes all native methods and core classes...
6.5 MB  
Programming  -  FLEX-db Digital Asset Manager 3.0.9
FLEX-db - an enterprise Digital Asset Manager (DAM). It ingests and links metadata with files, creates thumbnails, and processes files using business rules. FLEX-db has a JSP client, Java app server for file input and output and an EJB metadata...
21.57 MB  
Programming  -  Libicom 0.9.0
The libicom library is a character based dynamicly linked library for Linux. It is used to remotely control the Icom IC-R8500 wide band receiver via an RS232 link. All call and return parameters to the control functions are character string based....
20.48 KB  
Programming  -  dotdesktop 0.3
Dotdesktop library provides ability to parse desktop entry file and access the information in a convenient way. Desktop entry file format is defined by, it is used to describe information about an application such as the name and...
327.68 KB  
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  -  libyasl 0.2
Libyasl is a C++ class library to easily realize TCP/UDP/Multicast clientsand servers in IPv4 and IPv6 environments under GNU/Linux systems.
143.36 KB  
Libraries  -  wolfSSL 3.11.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...
2.73 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