Query: ropkg::exceptions
OS: debian
Section: 3pm
Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar
RoPkg::Exceptions(3pm) User Contributed Perl Documentation RoPkg::Exceptions(3pm)NAMERoPkg::Exceptions - exceptions used by RoPkg packagesDESCRIPTIONRoPkg::Exceptions is a collection of predefined exceptions used by all modules from RoPkg namespace.SYNOPSIS#!/usr/bin/perl use strict; use warnings; use RoPkg::Exceptions; sub main { eval { if ( $#ARGV == -1 ) { Param::Missing->throw('No parameter found'); } }; if ( my $e = Exception::Class->caught('Param::Missing') ) { print STDERR $e->message,$/,$e->trace,$/; } } main(); It is very possible that you don't find a good reason for using exceptions from this example. And you are right. This example is kind of silly. But, try to use exceptions in a real project. Then, you will apreciate their real value.DEPENDENCIESRoPkg::Exceptions require perl 5.008 or later and the Exception::Class module. Exceptions List The following exceptions are defined in this class: *) General - general pourpose exception *) OutsideClass - raised when a method is called outside a class instance *) File - the base for all file related exceptions . This exception has the filename parameter, who can be used to specify the path to the file. filename parameter can be used by all derivated exceptions. The following exceptions are derivated from File: *) File::NotFound - the file was not found *) File::Open - error while opening file *) File::Create - could not create file *) Dir - the base for all directory related exceptions . This exception has the dirname parameter, who can be used to specify the path to the directory. dirname parameter can be used by all derivated exceptions. The following exceptions are derivated from Dir: *) Dir::NotFound - the directory was not found *) Dir::Open - error while opening directory *) Dir::Create - could not create directory *) Param - the base for all parameters related exceptions. This exception has the name parameter, who can be used to specify the parameter name. name can be used by all derivated exceptions. The following exceptions are derivated from Param: *) Param::Missing - the parameter was not found *) Param::Unknown - the parameter is unknown *) Param::Wrong - the parameter has the wrong value or is not defined *) DB - the base for all database related exceptions. This exception has the following parameters: dsn, user and pass . This exception (and the ones derivated from her) are mostly used in RoPkg::DB class. Of course, this doesn't means that you can't use them in your application ;) .The following exceptions are derivated from DB: *) DB::Connect - raised when the connection with the database could not be established *) DB::ConnExists - raised when a connection with the same name already exists. *) DB::ConnNotFound - the requested connection was not found *) DB::NoResults - the sql query returned no results Exceptions Tree ROOT General OutsideClass File File::NotFound File::Open File::Create Dir Dir::NotFound Dir::Open Dir::Create Param Param::Missing Param::Unknown Param::Wrong DB DB::Connect DB::ConnExists DB::ConnNotFound DB::NoResultsSEE ALSORoPkg::UtilsAUTHORSubredu Manuel <diablo@iasi.roedu.net>VERSIONThe current version is 0.2.1DIAGNOSTICSThe tests for this module are located in t directory. To run those tests, use the following command: make testSUBROUTINES/METHODS This module does not have any public methods.INCOMPATIBILITIESNone known to mePERL CRITICThis module is perl critic level 1 compliant with 1 exception.BUGS AND LIMITATIONSNo known bugs. If you find one (or many) please send me a detailed report.CONFIGURATION AND ENVIRONMENTNo configuration file or environment variables are used by this module.LICENSE AND COPYRIGHTCopyright (C) 2005 Subredu Manuel. All Rights Reserved. This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. The LICENSE file contains the full text of the license. perl v5.8.8 2006-06-09 RoPkg::Exceptions(3pm)
Related Man Pages |
---|
ropkg::db(3pm) - debian |
ropkg::dbobject(3pm) - debian |
ropkg::rsync::atom(3pm) - debian |
ropkg::rsync::node(3pm) - debian |
ropkg::simba::mirror(3pm) - debian |
Similar Topics in the Unix Linux Community |
---|
Simply Explained: Checked Exceptions |
c++ object constructor question |
Comparing the characters of 2 variables |
Dir |
Replace file name from Other File |