Error Simple
Other packages in the module: Error Error::Simple
Package variablesGeneral documentationMethods
Toolbar
WebCvsRaw content
Package variables
No package variables defined.
Synopsis
No synopsis!
Description
No description!
Methods
new
No description
Code
stringify
No description
Code
Methods description
None available.
Methods code
newdescriptionprevnextTop
sub new {
    my $self  = shift;
    my $text  = "" . shift;
    my $value = shift;
    my(@args) = ();

    local $Error::Depth = $Error::Depth + 1;

    @args = ( -file => $1, -line => $2)
	if($text =~ s/ at (\S+) line (\d+)(\.\n)?$//s);

    push(@args, '-value', 0 + $value)
	if defined($value);

    $self->SUPER::new(-text => $text, @args);
}
stringifydescriptionprevnextTop
sub stringify {
    my $self = shift;
    my $text = $self->SUPER::stringify;
    $text .= sprintf(" at %s line %d.\n", $self->file, $self->line)
	unless($text =~ /\n$/s);
    $text;
}

##########################################################################
##########################################################################
# Inspired by code from Jesse Glick <jglick@sig.bsh.com> and
# Peter Seibel <peter@weblogic.com>
package Error::subs; use Exporter (); use vars qw(@EXPORT_OK @ISA %EXPORT_TAGS); @EXPORT_OK = qw(try with finally except otherwise); %EXPORT_TAGS = (try =>\@ EXPORT_OK); @ISA = qw(Exporter);
}
General documentation
No general documentation available.