Error/Better.pm untested

filter: Statementstmt 0.0% 0 / 18 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 3 Podpod 0.0% 0 / 1 totaltotal 0.0% 0 / 22 CC 1 SCAR 6.9
CC
1
Cov
0%
nice_text
2.0
BEGIN
2.0
BEGIN
2.0
CRAP 2.0
1 package Error::Better;
2
3 # Copyright (C) 2003 Matt Knopp <mhat@cpan.org>
4 # This library is free software released under the GNU Lesser General Public
5 # License, Version 2.1. Please read the important licensing and disclaimer
6 # information included in the LICENSE file included with this distribution.
7
8 use strict;
9 use Error;
10 our @ISA = qw (Error::Simple);
11
12 sub nice_text {
13 my $self = shift;
14 my $text = sprintf("Class: %s\n", ref($self));
15 $text .= sprintf("Text : %s\n", $self->text());
16 $text .= sprintf("File : %s\n", $self->file());
17 $text .= sprintf("Line : %d\n", $self->line());
18 return($text);
19 }
20
21 package Error::Better::InvalidArguments;
22 our @ISA = qw (Error::Better);
23
24 package Error::Better::OperationFailed;
25 our @ISA = qw (Error::Better);
26
27 package Error::Better::ObjectIncomplete;
28 our @ISA = qw (Error::Better);
29
30 package Error::Better::ObjectExists;
31 our @ISA = qw (Error::Better);
32
33 package Error::Better::ObjectNotFound;
34 our @ISA = qw (Error::Better);
35
36 1;