line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Net::Airbrake::Error; |
2
|
|
|
|
|
|
|
|
3
|
4
|
|
|
4
|
|
13442
|
use strict; |
|
4
|
|
|
|
|
5
|
|
|
4
|
|
|
|
|
120
|
|
4
|
4
|
|
|
4
|
|
15
|
use warnings; |
|
4
|
|
|
|
|
4
|
|
|
4
|
|
|
|
|
106
|
|
5
|
|
|
|
|
|
|
|
6
|
4
|
|
|
4
|
|
714
|
use Class::Tiny qw(type message backtrace); |
|
4
|
|
|
|
|
3820
|
|
|
4
|
|
|
|
|
17
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
sub BUILDARGS { |
9
|
8
|
|
|
8
|
0
|
9174
|
my $class = shift; |
10
|
8
|
|
|
|
|
9
|
my ($param) = @_; |
11
|
|
|
|
|
|
|
|
12
|
8
|
100
|
|
|
|
64
|
if (ref $param eq 'HASH') { |
|
|
100
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
13
|
2
|
|
|
|
|
3
|
return $param; |
14
|
|
|
|
|
|
|
} |
15
|
|
|
|
|
|
|
elsif (ref $param) { |
16
|
1
|
|
|
|
|
406894
|
require Data::Dumper; |
17
|
1
|
|
|
|
|
4851
|
return { type => ref $param, message => Data::Dumper::Dumper($param) }; |
18
|
|
|
|
|
|
|
} |
19
|
|
|
|
|
|
|
elsif ($param =~ /^(.+) at (.+) line (\d+)\.$/) { |
20
|
|
|
|
|
|
|
return { |
21
|
3
|
|
|
|
|
27
|
type => 'CORE::die', |
22
|
|
|
|
|
|
|
message => $1, |
23
|
|
|
|
|
|
|
backtrace => [ { file => $2, line => $3, function => 'N/A' } ], |
24
|
|
|
|
|
|
|
}; |
25
|
|
|
|
|
|
|
} |
26
|
|
|
|
|
|
|
else { |
27
|
2
|
|
|
|
|
10
|
return { type => 'error', message => "$param" }; |
28
|
|
|
|
|
|
|
} |
29
|
|
|
|
|
|
|
} |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
sub to_hash { |
32
|
2
|
|
|
2
|
0
|
3
|
my $self = shift; |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
{ |
35
|
1
|
|
|
|
|
88
|
type => $self->type, |
36
|
|
|
|
|
|
|
message => $self->message, |
37
|
|
|
|
|
|
|
backtrace => [ |
38
|
|
|
|
|
|
|
map { |
39
|
2
|
100
|
|
|
|
83
|
+{ |
40
|
|
|
|
|
|
|
file => '' . $_->{file}, |
41
|
|
|
|
|
|
|
line => 0 + $_->{line}, |
42
|
|
|
|
|
|
|
function => '' . $_->{function}, |
43
|
|
|
|
|
|
|
} |
44
|
2
|
|
|
|
|
30
|
} @{$self->backtrace || []} |
45
|
|
|
|
|
|
|
], |
46
|
|
|
|
|
|
|
}; |
47
|
|
|
|
|
|
|
} |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
1; |
50
|
|
|
|
|
|
|
__END__ |