line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Enbld::Exception; |
2
|
|
|
|
|
|
|
|
3
|
25
|
|
|
25
|
|
816
|
use strict; |
|
25
|
|
|
|
|
52
|
|
|
25
|
|
|
|
|
973
|
|
4
|
25
|
|
|
25
|
|
135
|
use warnings; |
|
25
|
|
|
|
|
46
|
|
|
25
|
|
|
|
|
865
|
|
5
|
|
|
|
|
|
|
|
6
|
25
|
|
|
25
|
|
143
|
use Carp; |
|
25
|
|
|
|
|
51
|
|
|
25
|
|
|
|
|
2257
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
use overload ( |
9
|
25
|
|
|
|
|
291
|
q{""} => \&to_string, |
10
|
|
|
|
|
|
|
fallback => 1, |
11
|
25
|
|
|
25
|
|
160
|
); |
|
25
|
|
|
|
|
49
|
|
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
sub throw { |
14
|
32
|
|
|
32
|
0
|
787
|
my ( $class, $message, $param ) = @_; |
15
|
|
|
|
|
|
|
|
16
|
32
|
|
|
|
|
138
|
die $class->new( $message, $param ); |
17
|
|
|
|
|
|
|
} |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
sub new { |
20
|
79
|
|
|
79
|
0
|
1342
|
my ( $class, $message, $param ) = @_; |
21
|
|
|
|
|
|
|
|
22
|
79
|
|
|
|
|
171
|
chomp( $message ); |
23
|
|
|
|
|
|
|
|
24
|
79
|
100
|
|
|
|
216
|
if ( $param ) { $message .= "\n" . $param . "\n" }; |
|
25
|
|
|
|
|
67
|
|
25
|
|
|
|
|
|
|
|
26
|
79
|
50
|
|
|
|
1570
|
my $location = $ENV{HARNESS_ACTIVE} ? Carp::longmess() : Carp::shortmess(); |
27
|
|
|
|
|
|
|
|
28
|
79
|
|
|
|
|
119777
|
my $self = { |
29
|
|
|
|
|
|
|
message => $message, |
30
|
|
|
|
|
|
|
caller_location => $location, |
31
|
|
|
|
|
|
|
}; |
32
|
|
|
|
|
|
|
|
33
|
79
|
|
|
|
|
967
|
return bless $self, $class; |
34
|
|
|
|
|
|
|
} |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
sub to_string { |
37
|
79
|
|
|
79
|
0
|
7374
|
my $self = shift; |
38
|
|
|
|
|
|
|
|
39
|
79
|
|
|
|
|
665
|
return "ABORT:$self->{message}$self->{caller_location}"; |
40
|
|
|
|
|
|
|
} |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
1; |