# # x.x@toulouse.inra.fr # Created: May 03, 2007 # Last Updated: May 03, 2007 # package LipmError::xxx;
Error::xxx - a class to define specific exception of xxx
throw LipmError::xxx('description'); catch LipmError::xxx with {...}
With this class you can describe all type of exception encountered by xxx.
x x : x.x@toulouse.inra.fr
use warnings; use strict; ## this class inherit from Error.pm use base qw(Error); ## ?? use overload ('""' => 'stringify'); # # pour l'heritage facon livre # require 'UNIVERSAL.pl'; # il faudrait limiter les dependances BEGIN { our $VERSION = do {my @r = (q$Rev$ =~ /\d+/g); $r[0]}; }
Title : new Usage : my $o_circos = new X(); Prerequisite : it's better for an error to be catch ! Function : Constructor, initialize the object Returns : the object, can throw XXX error. Args : none Globals : none
sub new { my $class = shift; my ($text) = @_; my @args = (); local $Error::Depth = $Error::Depth + 1; local $Error::Debug = 1; # Enables storing of stacktrace $self->SUPER::new(-text => $text, @args); } 1;