line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
2
|
|
|
2
|
|
1128
|
use v5.10; |
|
2
|
|
|
|
|
7
|
|
2
|
2
|
|
|
2
|
|
19
|
use strict; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
45
|
|
3
|
2
|
|
|
2
|
|
10
|
use warnings; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
128
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
package Neo4j::Error::Server; |
6
|
|
|
|
|
|
|
# ABSTRACT: Neo4j exception thrown by the Neo4j server |
7
|
|
|
|
|
|
|
$Neo4j::Error::Server::VERSION = '0.01'; |
8
|
|
|
|
|
|
|
|
9
|
2
|
|
|
2
|
|
28
|
use parent 'Neo4j::Error'; |
|
2
|
|
|
|
|
6
|
|
|
2
|
|
|
|
|
13
|
|
10
|
|
|
|
|
|
|
|
11
|
2
|
|
|
2
|
|
199
|
use List::Util 1.33 qw(all); |
|
2
|
|
|
|
|
44
|
|
|
2
|
|
|
|
|
1219
|
|
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
|
14
|
4
|
|
|
4
|
1
|
24
|
sub source { 'Server' } |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
sub message { |
18
|
28
|
|
|
28
|
1
|
40
|
my ($self) = @_; |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
# Decode "strict" Jolt format if necessary |
21
|
28
|
100
|
|
|
|
91
|
$self->{message} = $self->{message}{U} if ref $self->{message} eq 'HASH'; |
22
|
|
|
|
|
|
|
|
23
|
28
|
|
100
|
|
|
147
|
return $self->{message} // ''; |
24
|
|
|
|
|
|
|
} |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
sub code { |
28
|
28
|
|
|
28
|
1
|
45
|
my ($self) = @_; |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
# Decode "strict" Jolt format if necessary |
31
|
28
|
100
|
|
|
|
68
|
$self->{code} = $self->{code}{U} if ref $self->{code} eq 'HASH'; |
32
|
|
|
|
|
|
|
|
33
|
28
|
100
|
|
|
|
108
|
return $self->{code} if defined $self->{code}; |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
my @parts = ( |
36
|
|
|
|
|
|
|
'Neo', |
37
|
|
|
|
|
|
|
$self->{classification}, |
38
|
|
|
|
|
|
|
$self->{category}, |
39
|
|
|
|
|
|
|
$self->{title}, |
40
|
7
|
|
|
|
|
18
|
); |
41
|
7
|
100
|
|
19
|
|
34
|
return '' unless all { defined } @parts; |
|
19
|
|
|
|
|
42
|
|
42
|
1
|
|
|
|
|
6
|
return $self->{code} = join '.', @parts; |
43
|
|
|
|
|
|
|
} |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
sub _parse_code { |
47
|
12
|
|
|
12
|
|
22
|
my ($self, $part) = @_; |
48
|
|
|
|
|
|
|
|
49
|
12
|
100
|
|
|
|
37
|
return '' unless defined $self->{code}; |
50
|
11
|
|
|
|
|
83
|
my @parts = $self->{code} =~ m/^Neo\.([^\.]+)\.([^\.]+)\.(.+)$/i; |
51
|
11
|
100
|
|
|
|
52
|
return '' unless @parts; |
52
|
|
|
|
|
|
|
|
53
|
8
|
|
|
|
|
16
|
$self->{classification} = $parts[0]; |
54
|
8
|
|
|
|
|
12
|
$self->{category} = $parts[1]; |
55
|
8
|
|
|
|
|
8
|
$self->{title} = $parts[2]; |
56
|
8
|
|
|
|
|
50
|
return $self->{$part}; |
57
|
|
|
|
|
|
|
} |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
sub classification { |
61
|
11
|
|
|
11
|
1
|
20
|
my ($self) = @_; |
62
|
|
|
|
|
|
|
|
63
|
11
|
|
100
|
|
|
46
|
return $self->{classification} // $self->_parse_code('classification'); |
64
|
|
|
|
|
|
|
} |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
sub category { |
68
|
7
|
|
|
7
|
1
|
14
|
my ($self) = @_; |
69
|
|
|
|
|
|
|
|
70
|
7
|
|
100
|
|
|
30
|
return $self->{category} // $self->_parse_code('category'); |
71
|
|
|
|
|
|
|
} |
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
sub title { |
75
|
7
|
|
|
7
|
1
|
13
|
my ($self) = @_; |
76
|
|
|
|
|
|
|
|
77
|
7
|
|
100
|
|
|
32
|
return $self->{title} // $self->_parse_code('title'); |
78
|
|
|
|
|
|
|
} |
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
sub is_retryable { |
82
|
4
|
|
|
4
|
1
|
9
|
my ($self) = @_; |
83
|
|
|
|
|
|
|
|
84
|
4
|
|
|
|
|
9
|
return $self->classification eq 'TransientError'; |
85
|
|
|
|
|
|
|
} |
86
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
1; |