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.327.054 Times

Exception::Class::TCF 0.03

  Date Added: January 16, 2010  |  Visits: 860

Exception::Class::TCF

Report Broken Link
Printer Friendly Version


Product Homepage
Download (88 downloads)



Exception::Class::TCF is a Java/C++ style exception handling. SYNOPSIS try BLOCK [ [catch] NAME FUN_REF ]* throw [ EXCEPTION LIST ] package EnclosureException; @ISA = qw(Exception::Class::TCF); package main; use Exception::Class::TCF; try { if ($Lost) { throw new EnclosureException Message => "Help!"; } else { throw Error; } } catch EnclosureException => sub { warn "Message ",$_[0]->message," received.n" }, Default => sub { warn $_[0]->type, " exception ignored, trace:", $_[0]->trace }; The Exception::Class::TCF module provides the possibility of executing a code block and specifying actions when different exceptions are raised. The try function takes as its argument a code block followed by a list of pairs of exception package names and function references, representing the action to take if a subclass of that package is raised. To increase readability the keyword catch may be inserted before any name-action pair. The return value of try is the return value of the block if no exception is thrown and the return value of the action of the chosen action in case one is found. Even though the builtin die is used in the implementation any explicit use of die within the dynamic scope is ignored by the exception mechanism and thus works as usual. On the other hand an eval block will catch a thrown exception if it has not been caught by a try block. The clean-up routines after such a block may call throw as in the next section. How to create an exception context. An exception context in which thrown exceptions are handled is created using try as in try { throw Error } catch Default => sub { warn "Wow" }; The first argument is a code block (or a function reference). It will be referred to as a try block and any code executed inside it (including psossibly nested calls of functions in it) will be said to be in the dynamic scope of the block. After the try block follows a sequence of exception name - handling code pairs. The name will be referred to as the exception key and the corresponding code the handler (or catch handler) for that key. An exception is either the name of a package inheriting from the package Exception::Class::TCF or an object blessed in such a package. In both cases the name of the package will be referred to as the name of the exception. All exception keys has to be names of exceptions except the special exception key Default which is the name for exceptions of package Exception::Class::TCF. In order not to clutter package name space, package names are normally prefixed by the Exception::Class::TCF:: prefix. To increase readability this prefix may be removed in exception key names and when calling throw with a package name as first argument. The exception key may also be the string Finally. This does not correspond to an exception but instead its handler will be called just before the try function returns. Its value will be ignored however. As new is a virtual function it can not be called with these shortened package names. For this on can use Exception::Class::TCF::make instead..

Requirements: No special requirements
Platforms: Linux
Keyword: Block Code Enclosureexception Exception Exceptionclasstcf Libraries Name Package Programming Tcf Throw Try Block Will Be
Users rating: 0/10

License: Freeware Size: 11.26 KB
USER REVIEWS
More Reviews or Write Review


EXCEPTION::CLASS::TCF RELATED
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  
Arcade Style Games  -  Block Rage 0.2.3
Block Rage will be a falling blocks game with detailed graphics and animated plasmatic backgrounds. You will be able to challenge your friend in a 2-player hotseat mode! It is strongly inspired by a superb DOS classic. At present, the game is...
64.51 KB  
Business  -  gnome-user-docs 2.18.2
gnome-user-docs package contains documents which will be packaged together and shipped as gnome-user-docs in the core GNOME distribution. They should be documents targetted for end-users of GNOME. Installation: The simplest way to compile...
6.9 MB  
Utilities  -  whohas 0.15
whohas is a command line tool that allows querying several package lists at once - currently supported are Arch, Debian, Fedora, Gentoo, Slackware (and linuxpackages.net), Source Mage, FreeBSD, NetBSD, OpenBSD, Fink and DarwinPorts. whohas is...
18.43 KB  
Communication  -  SigBuilder Code Generator 1.0
The Signal Builder Block will only generate code for 1 test group. This block is designed to generate the code for the other test groups and allow for easy selection through a tunable parameter.This also allows for programmatic control of the...
20.48 KB  
Libraries  -  B::JVM::Jasmin::Emit 0.02
B::JVM::Jasmin::Emit is a package used by B::JVM::Jasmin to emit Jasmin syntaxed file. SYNOPSIS use B::JVM::Jasmin::Emit; my $emitter = new B::JVM::Emit(FILEHANDLE); # ... $emitter->DIRECTIVE_NAME([@ARGS]); # ......
44.03 KB  
Science  -  R Package for the Analysis of DCE-MRI 4.0.45
A collection of code, bundled into a single R package, to perform several aspects of data management, image pre-processing, data analysis and statistical inference related to the quantitative analysis of dynamic contrast-enhanced MRI (DCE-MRI).
4.16 MB  
Modules  -  Block Content Per Role 6.x-1.1
Block Content Per Role allows a block to be defined which contains content that is displayed depending on a weighted set of roles. This is useful, for example, if you want one block for a subscriber role, one for authenticated and one for...
10 KB  
Libraries  -  Software::Packager::Rpm 0.06
Software::Packager::Rpm is a suite of Perl modules providing a common interface for the creation of platform specific software installation packagers. add_item() my %object_data = ( SOURCE => /source/file1, TYPE => file, KIND => doc,...
13.31 KB  
Libraries  -  Template::Plugin::Java 0.4
Template::Plugin::Java is a Perl module that can generate Java Classes from XML description files and templates. SYNOPSIS From an xml file such as: value2 10<...
18.43 KB  
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