Servlet/ServletException.pm

filter: Statementstmt 100% 3 / 3 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 1 / 1 Podpod n/a totaltotal 100% 4 / 4 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
CRAP 1.0
« Servlet/ServletContextEvent.pm ↑ Summary Servlet/ServletRequest.pm »
1 # -*- Mode: Perl; indent-tabs-mode: nil; -*-
2  
3 package Servlet::ServletException;
4  
5 2 ▶use base qw(Servlet::Util::Exception);
Subroutine BEGIN: called CC=1 SCAR=0.0
6 use strict;
7 use warnings;
8  
9 __PACKAGE__->do_trace(1);
10  
11 sub new {
12 my $type = shift;
13 my $msg = shift;
14 my $root = shift;
15  
16 my $class = ref($type) || $type;
17 my $error = $root && !$msg ?
18 $root->getMessage() :
19 $msg;
20 my $self = $class->SUPER::new($error);
21  
22 $self->{root} = $root;
23  
24 return $self;
25 }
26  
27 sub getRootCause {
28 my $self = shift;
29  
30 return $self->{root};
31 }
32  
33 1;
34 __END__
« Servlet/ServletContextEvent.pm ↑ Summary Servlet/ServletRequest.pm »