| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
package App::HL7::Compare::Exception; |
|
2
|
|
|
|
|
|
|
$App::HL7::Compare::Exception::VERSION = '0.001'; |
|
3
|
3
|
|
|
3
|
|
37
|
use v5.10; |
|
|
3
|
|
|
|
|
11
|
|
|
4
|
3
|
|
|
3
|
|
16
|
use strict; |
|
|
3
|
|
|
|
|
9
|
|
|
|
3
|
|
|
|
|
76
|
|
|
5
|
3
|
|
|
3
|
|
15
|
use warnings; |
|
|
3
|
|
|
|
|
7
|
|
|
|
3
|
|
|
|
|
87
|
|
|
6
|
|
|
|
|
|
|
|
|
7
|
3
|
|
|
3
|
|
17
|
use Moo; |
|
|
3
|
|
|
|
|
7
|
|
|
|
3
|
|
|
|
|
24
|
|
|
8
|
3
|
|
|
3
|
|
1121
|
use Mooish::AttributeBuilder -standard; |
|
|
3
|
|
|
|
|
36
|
|
|
|
3
|
|
|
|
|
40
|
|
|
9
|
3
|
|
|
3
|
|
350
|
use Types::Standard qw(Str Maybe ArrayRef); |
|
|
3
|
|
|
|
|
5
|
|
|
|
3
|
|
|
|
|
30
|
|
|
10
|
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
use overload |
|
12
|
3
|
|
|
|
|
29
|
q{""} => "to_string", |
|
13
|
3
|
|
|
3
|
|
5307
|
fallback => 1; |
|
|
3
|
|
|
|
|
7
|
|
|
14
|
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
has param 'message' => ( |
|
16
|
|
|
|
|
|
|
isa => Str, |
|
17
|
|
|
|
|
|
|
); |
|
18
|
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
has field 'caller' => ( |
|
20
|
|
|
|
|
|
|
isa => Maybe [ArrayRef], |
|
21
|
|
|
|
|
|
|
default => sub { |
|
22
|
|
|
|
|
|
|
for my $call_level (1 .. 10) { |
|
23
|
|
|
|
|
|
|
my ($package, $file, $line) = caller $call_level; |
|
24
|
|
|
|
|
|
|
if (defined $package && $package !~ /^App::HL7::Compare/) { |
|
25
|
|
|
|
|
|
|
return [$package, $file, $line]; |
|
26
|
|
|
|
|
|
|
} |
|
27
|
|
|
|
|
|
|
} |
|
28
|
|
|
|
|
|
|
return undef; |
|
29
|
|
|
|
|
|
|
}, |
|
30
|
|
|
|
|
|
|
); |
|
31
|
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
sub raise |
|
33
|
|
|
|
|
|
|
{ |
|
34
|
0
|
|
|
0
|
0
|
|
my ($self, $error) = @_; |
|
35
|
|
|
|
|
|
|
|
|
36
|
0
|
0
|
|
|
|
|
if (defined $error) { |
|
37
|
0
|
|
|
|
|
|
$self = $self->new(message => $error); |
|
38
|
|
|
|
|
|
|
} |
|
39
|
|
|
|
|
|
|
|
|
40
|
0
|
|
|
|
|
|
die $self; |
|
41
|
|
|
|
|
|
|
} |
|
42
|
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
sub to_string |
|
44
|
|
|
|
|
|
|
{ |
|
45
|
0
|
|
|
0
|
0
|
|
my ($self) = @_; |
|
46
|
|
|
|
|
|
|
|
|
47
|
0
|
|
|
|
|
|
my $raised = $self->message; |
|
48
|
0
|
|
|
|
|
|
$raised =~ s/\s+\z//; |
|
49
|
|
|
|
|
|
|
|
|
50
|
0
|
|
|
|
|
|
my $caller = $self->caller; |
|
51
|
0
|
0
|
|
|
|
|
if (defined $caller) { |
|
52
|
0
|
|
|
|
|
|
$raised .= ' (raised at ' . $caller->[1] . ', line ' . $caller->[2] . ')'; |
|
53
|
|
|
|
|
|
|
} |
|
54
|
|
|
|
|
|
|
|
|
55
|
0
|
|
|
|
|
|
return "An error occured in HL7 subroutines: $raised"; |
|
56
|
|
|
|
|
|
|
} |
|
57
|
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
1; |
|
59
|
|
|
|
|
|
|
|