BioMart Exception
SummaryPackage variablesSynopsisDescriptionGeneral documentation
Toolbar
WebCvsRaw content
Summary
BioMart::Exception - Exceptions thrown by BioMart library modules
Package variables
No package variables defined.
Included modules
Exception::Class ( ' BioMart::Exception ' , BioMart::Exception::Configuration => { isa => ' BioMart::Exception ' , description => ' Error in BioMart configuration ' } , BioMart::Exception::Template => { isa => ' BioMart::Exception ' , description => ' Error in MartView templating system ' } , BioMart::Exception::Database => { isa => ' BioMart::Exception ' , description => ' Error in BioMart database connection or statement ' , fields => [ ' dbh ' , ' sth ' ] , } , BioMart::Exception::Query => { isa => ' BioMart::Exception ' , description => ' Error in building or executing Mart query ' , fields => [ ' query ' ] , } , BioMart::Exception::Formatting => { isa => ' BioMart::Exception ' , description => ' Error in output formatting ' } , BioMart::Exception::Session => { isa => ' BioMart::Exception ' , description => ' Error in retrieving or storing a user session ' } , BioMart::Exception::Usage => { isa => ' BioMart::Exception ' , description => ' Error in usage of API ' } , )
Synopsis
   # In library code
use BioMart::Exception;
if('something goes horribly wrong in database-query') {
BioMart::Exception::Database->throw('this query is busted');
}
# In calling code use BioMart::Exception; eval{ 'attempt to execute prepared Mart-query' }; my $e; if($e = Exception::Class->caught('BioMart::Exception::Database')) { print "caught db-error"; # do something about error, if possible }
Description
BioMart::Exception defines in a single module all exceptions thrown by the BioMart
modules. This is done in very few lines of code via the Exception::Class module
(see POD at http://search.cpan.org/~drolsky/Exception-Class/).
Even though the 'automagic' framework is used, one can still do interesting things
like attach filehandles or db-statement handles to the exception before throwing it.
This may make it easier for the calling code to handle the exception.
Methods description
None available.
Methods code
No methods available.
General documentation
AUTHOR - Arek Kasprzyk, Syed Haider, Richard Holland, Damian Smedley, Gudmundur Arni ThorissonTop
EXCEPTION CLASSESTop
BioMart::Exception::ConfigurationTop
Error related to Mart configuration, such as attempts to retrieve a non-existing
filter from a dataset config-tree or adding an undefined filter to a query.
BioMart::Exception::DatabaseTop
Error related to a Mart database connection, such as incorrect db-connection
parameters or bad SQL-statement.
BioMart::Exception::TemplateTop
Error related to MartView templating system, such as a syntax error in a template
or other problem relating to processing a template
BUGS AND LIMITATIONSTop
There are no known bugs in this module.
Please report problems to BioMart development mailing list (<mart-dev@ebi.ac.uk>)
Patches are welcome.
CONTACTTop
This module is part of the BioMart project http://www.biomart.org
Questions can be posted to the mart-dev mailing list: mart-dev@ebi.ac.uk
AUTHORTop
Gudmundur A. Thorisson <mummi@cshl.edu>
LICENCE AND COPYRIGHTTop
Copyright (c) <year> <copyright holder> (<contact address>). All rights reserved.
This module is free software; you can redistribute it and/or
modify it under the same terms as Perl itself. See perlartistic.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.