Servlet/Util/Exception.pm

filter: Statementstmt 76.9% 30 / 39 Branchbran n/a Conditioncond 0.0% 0 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 76.9% 10 / 13 Podpod n/a totaltotal 70.1% 40 / 57 CC 2 SCAR 6.2
CC
2
Cov
71%
new
6.0
getMessage
2.0
toString
2.0
CRAP 1.9
« Servlet/FilterConfig.pm ↑ Summary Servlet/Util/Event.pm »
1 # -*- Mode: Perl; indent-tabs-mode: nil; -*-
2  
3 package Servlet::Util::Exception;
4  
5 4 ▶use Exception::Class ();
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 4 ▶use base qw(Exception::Class::Base);
Subroutine BEGIN: called CC=1 SCAR=0.0
8 4 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
9 4 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
10  
11 # for some reason, if i try to declare subclasses via
12 # Exception::Class::import(), things break. i can't figure out why,
13 # and it's not really important.
14  
15 __PACKAGE__->do_trace(1);
16  
17 0 ▶sub new {
Subroutine new: not called CC=2 SCAR=17.9
18 0 my $type = shift;
19 0 my $msg = shift;
20  
21 0 ▶ my $class = ref($type) || $type;
Condition0%0/3
ref $type || $type
l!l&&r!l&&!r
000
MC/DC0%0/2
ref $type || $type
ref $type $type
Truth table0%0/3
A || B
A= ref $typeB= $type
ABresult
1X1
011
000
22 0 my $self = $class->SUPER::new(error => $msg);
23  
24 0 return $self;
25 }
26  
27 0 ▶sub getMessage {
Subroutine getMessage: not called CC=1 SCAR=6.9
28 0 my $self = shift;
29  
30 0 return $self->error();
31 }
32  
33 0 ▶sub toString {
Subroutine toString: not called CC=1 SCAR=6.9
34 0 my $self = shift;
35  
36 0 return $self->to_string();
37 }
38  
39 1;
40  
41 package Servlet::Util::IOException;
42  
43 4 ▶use base qw(Servlet::Util::Exception);
Subroutine BEGIN: called CC=1 SCAR=0.0
44  
45 __PACKAGE__->do_trace(1);
46  
47 1;
48 package Servlet::Util::IllegalArgumentException;
49  
50 4 ▶use base qw(Servlet::Util::Exception);
Subroutine BEGIN: called CC=1 SCAR=0.0
51  
52 __PACKAGE__->do_trace(1);
53  
54 1;
55 package Servlet::Util::IllegalStateException;
56  
57 4 ▶use base qw(Servlet::Util::Exception);
Subroutine BEGIN: called CC=1 SCAR=0.0
58  
59 __PACKAGE__->do_trace(1);
60  
61 1;
62 package Servlet::Util::IndexOutOfBoundsException;
63  
64 4 ▶use base qw(Servlet::Util::Exception);
Subroutine BEGIN: called CC=1 SCAR=0.0
65  
66 __PACKAGE__->do_trace(1);
67  
68 1;
69 package Servlet::Util::UndefReferenceException;
70  
71 4 ▶use base qw(Servlet::Util::Exception);
Subroutine BEGIN: called CC=1 SCAR=0.0
72  
73 __PACKAGE__->do_trace(1);
74  
75 1;
76 package Servlet::Util::UnsupportedEncodingException;
77  
78 4 ▶use base qw(Servlet::Util::Exception);
Subroutine BEGIN: called CC=1 SCAR=0.0
79  
80 __PACKAGE__->do_trace(1);
81  
82 1;
83 __END__
« Servlet/FilterConfig.pm ↑ Summary Servlet/Util/Event.pm »