line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Git::Raw::Error; |
2
|
|
|
|
|
|
|
$Git::Raw::Error::VERSION = '0.86'; |
3
|
35
|
|
|
35
|
|
240
|
use strict; |
|
35
|
|
|
|
|
63
|
|
|
35
|
|
|
|
|
994
|
|
4
|
35
|
|
|
35
|
|
170
|
use warnings; |
|
35
|
|
|
|
|
61
|
|
|
35
|
|
|
|
|
762
|
|
5
|
35
|
|
|
35
|
|
162
|
use Carp; |
|
35
|
|
|
|
|
60
|
|
|
35
|
|
|
|
|
5854
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
use overload |
8
|
16
|
|
|
16
|
|
25898
|
'""' => sub { return $_[0] -> message.' at '.$_[0] -> file.' line '.$_[0] -> line }, |
9
|
0
|
|
|
0
|
|
0
|
'0+' => sub { return $_[0] -> code }, |
10
|
2
|
|
|
2
|
|
38593
|
'bool' => sub { return $_[0] -> _is_error }, |
11
|
35
|
|
|
35
|
|
43524
|
'fallback' => 1; |
|
35
|
|
|
|
|
35011
|
|
|
35
|
|
|
|
|
363
|
|
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
sub AUTOLOAD { |
14
|
|
|
|
|
|
|
# This AUTOLOAD is used to 'autoload' constants from the constant() |
15
|
|
|
|
|
|
|
# XS function. |
16
|
|
|
|
|
|
|
|
17
|
30
|
|
|
30
|
|
20797
|
my $constname; |
18
|
30
|
|
|
|
|
42
|
our $AUTOLOAD; |
19
|
30
|
|
|
|
|
193
|
($constname = $AUTOLOAD) =~ s/.*:://; |
20
|
30
|
50
|
|
|
|
101
|
croak "&Git::Raw::Error::constant not defined" if $constname eq '_constant'; |
21
|
30
|
|
|
|
|
183
|
my ($error, $val) = _constant($constname); |
22
|
30
|
100
|
|
|
|
70
|
if ($error) { croak $error; } |
|
1
|
|
|
|
|
227
|
|
23
|
|
|
|
|
|
|
{ |
24
|
35
|
|
|
35
|
|
6360
|
no strict 'refs'; |
|
35
|
|
|
|
|
96
|
|
|
35
|
|
|
|
|
2630
|
|
|
29
|
|
|
|
|
42
|
|
25
|
29
|
|
|
34
|
|
174
|
*$AUTOLOAD = sub { $val }; |
|
34
|
|
|
|
|
5473
|
|
26
|
|
|
|
|
|
|
} |
27
|
29
|
|
|
|
|
103
|
goto &$AUTOLOAD; |
28
|
|
|
|
|
|
|
} |
29
|
|
|
|
|
|
|
|
30
|
35
|
|
|
35
|
|
230
|
use Git::Raw; |
|
35
|
|
|
|
|
66
|
|
|
35
|
|
|
|
|
1811
|
|
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
=head1 NAME |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
Git::Raw::Error - Error class |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
=head1 VERSION |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
version 0.86 |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
=head1 DESCRIPTION |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
A L represents an error. A L may be the result |
43
|
|
|
|
|
|
|
of a libgit2 error, or may be generated internally due to misuse of the API. |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
B: The API of this module is unstable and may change without warning |
46
|
|
|
|
|
|
|
(any change will be appropriately documented in the changelog). |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
=head1 METHODS |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
=head2 message( ) |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
Error message. |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
=head2 file( ) |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
Caller file. |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
=head2 line( ) |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
Caller line. |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
=head2 code( ) |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
Error code. |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
=head2 category( ) |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
The category (class) or source of the error. |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
=head1 CONSTANTS |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
=head2 OK |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
No error. |
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
=head2 ERROR |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
Generic error. |
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
=head2 ENOTFOUND |
81
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
The eequested object could not be found. |
83
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
=head2 EEXISTS |
85
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
The object already exists. |
87
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
=head2 EAMBIGUOUS |
89
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
More than one object matches. |
91
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
=head2 EBUFS |
93
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
Output buffer too short to hold data. |
95
|
|
|
|
|
|
|
|
96
|
|
|
|
|
|
|
=head2 EBAREREPO |
97
|
|
|
|
|
|
|
|
98
|
|
|
|
|
|
|
The operation is is not allowed on a bare repository. |
99
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
=head2 EUNBORNBRANCH |
101
|
|
|
|
|
|
|
|
102
|
|
|
|
|
|
|
C refers to a branch with no commits. |
103
|
|
|
|
|
|
|
|
104
|
|
|
|
|
|
|
=head2 EUNMERGED |
105
|
|
|
|
|
|
|
|
106
|
|
|
|
|
|
|
A merge is in progress. |
107
|
|
|
|
|
|
|
|
108
|
|
|
|
|
|
|
=head2 ENONFASTFORWARD |
109
|
|
|
|
|
|
|
|
110
|
|
|
|
|
|
|
Reference was not fast-forwardable. |
111
|
|
|
|
|
|
|
|
112
|
|
|
|
|
|
|
=head2 EINVALIDSPEC |
113
|
|
|
|
|
|
|
|
114
|
|
|
|
|
|
|
Name/ref spec was not in a valid format. |
115
|
|
|
|
|
|
|
|
116
|
|
|
|
|
|
|
=head2 ECONFLICT |
117
|
|
|
|
|
|
|
|
118
|
|
|
|
|
|
|
Checkout conflicts prevented operation. |
119
|
|
|
|
|
|
|
|
120
|
|
|
|
|
|
|
=head2 ELOCKED |
121
|
|
|
|
|
|
|
|
122
|
|
|
|
|
|
|
Lock file prevented operation. |
123
|
|
|
|
|
|
|
|
124
|
|
|
|
|
|
|
=head2 EMODIFIED |
125
|
|
|
|
|
|
|
|
126
|
|
|
|
|
|
|
Reference value does not match expected. |
127
|
|
|
|
|
|
|
|
128
|
|
|
|
|
|
|
=head2 EAUTH |
129
|
|
|
|
|
|
|
|
130
|
|
|
|
|
|
|
Authentication error. |
131
|
|
|
|
|
|
|
|
132
|
|
|
|
|
|
|
=head2 ECERTIFICATE |
133
|
|
|
|
|
|
|
|
134
|
|
|
|
|
|
|
Server certificate is invalid. |
135
|
|
|
|
|
|
|
|
136
|
|
|
|
|
|
|
=head2 EAPPLIED |
137
|
|
|
|
|
|
|
|
138
|
|
|
|
|
|
|
Patch/merge has already been applied. |
139
|
|
|
|
|
|
|
|
140
|
|
|
|
|
|
|
=head2 EPEEL |
141
|
|
|
|
|
|
|
|
142
|
|
|
|
|
|
|
The requested peel operation is not possible. |
143
|
|
|
|
|
|
|
|
144
|
|
|
|
|
|
|
=head2 EEOF |
145
|
|
|
|
|
|
|
|
146
|
|
|
|
|
|
|
Unepected C. |
147
|
|
|
|
|
|
|
|
148
|
|
|
|
|
|
|
=head2 EINVALID |
149
|
|
|
|
|
|
|
|
150
|
|
|
|
|
|
|
Invalid operation or input. |
151
|
|
|
|
|
|
|
|
152
|
|
|
|
|
|
|
=head2 EUNCOMMITTED |
153
|
|
|
|
|
|
|
|
154
|
|
|
|
|
|
|
Uncommited changes in index prevented operation. |
155
|
|
|
|
|
|
|
|
156
|
|
|
|
|
|
|
=head2 EDIRECTORY |
157
|
|
|
|
|
|
|
|
158
|
|
|
|
|
|
|
The operation is not valid for a directory. |
159
|
|
|
|
|
|
|
|
160
|
|
|
|
|
|
|
=head2 EMERGECONFLICT |
161
|
|
|
|
|
|
|
|
162
|
|
|
|
|
|
|
A merge conflict exists and cannot continue. |
163
|
|
|
|
|
|
|
|
164
|
|
|
|
|
|
|
=head2 PASSTHROUGH |
165
|
|
|
|
|
|
|
|
166
|
|
|
|
|
|
|
Passthrough |
167
|
|
|
|
|
|
|
|
168
|
|
|
|
|
|
|
=head1 AUTHOR |
169
|
|
|
|
|
|
|
|
170
|
|
|
|
|
|
|
Alessandro Ghedini |
171
|
|
|
|
|
|
|
|
172
|
|
|
|
|
|
|
Jacques Germishuys |
173
|
|
|
|
|
|
|
|
174
|
|
|
|
|
|
|
=head1 LICENSE AND COPYRIGHT |
175
|
|
|
|
|
|
|
|
176
|
|
|
|
|
|
|
Copyright 2014 Alessandro Ghedini. |
177
|
|
|
|
|
|
|
|
178
|
|
|
|
|
|
|
This program is free software; you can redistribute it and/or modify it |
179
|
|
|
|
|
|
|
under the terms of either: the GNU General Public License as published |
180
|
|
|
|
|
|
|
by the Free Software Foundation; or the Artistic License. |
181
|
|
|
|
|
|
|
|
182
|
|
|
|
|
|
|
See http://dev.perl.org/licenses/ for more information. |
183
|
|
|
|
|
|
|
|
184
|
|
|
|
|
|
|
=cut |
185
|
|
|
|
|
|
|
|
186
|
|
|
|
|
|
|
1; # End of Git::Raw::Error |