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