modele.pm

Code Index:


#
# 	x.x@toulouse.inra.fr
#	Created: May 03, 2007
#	Last Updated: May 03, 2007
#

package LipmError::xxx;


NAME

Error::xxx - a class to define specific exception of xxx


SYNOPSIS

        throw LipmError::xxx('description');
        catch LipmError::xxx with {...}


DESCRIPTION

        With this class you can describe all type of exception encountered by xxx.


AUTHOR

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]};
}

Function new

 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;