![]() |
![]()
| ![]() |
![]()
NAMEBio::NEXUS::Util::Exceptions - Exception classes for Bio::NEXUS. SYNOPSISuse Bio::NEXUS::Node; my $node = Bio::NEXUS::Node->new; # now let's try something illegal eval { $node->set_branch_length( 'non-numerical value' ); }; # have an error if ( $@ && UNIVERSAL::isa( $@, 'Bio::NEXUS::Util::Exception' ) ) { # print out where the error came from print $@->trace->as_string; } DESCRIPTIONSometimes, Bio::NEXUS dies. If this happens because you did something that brought Bio::NEXUS into an undefined and dangerous state (such as might happen if you provide a non-numerical value for a setter that needs numbers), Bio::NEXUS will throw an "exception", a special form of the $@ variable that is a blessed object with useful methods to help you diagnose the problem. This package defines the exceptions that can be thrown by Bio::NEXUS. There are no serviceable parts inside. Refer to the Exception::Class perldoc for more examples on how to catch exceptions and show traces. AUTHORSOriginal conception by Rutger Vos. EXCEPTION CLASSES
METHODS
REVISION$Id: Exceptions.pm,v 1.5 2012/02/07 21:49:27 astoltzfus Exp $
|