None available.
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); } |
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;
}
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); } |