line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
# Copyright (c) 2015 Timm Murray |
2
|
|
|
|
|
|
|
# All rights reserved. |
3
|
|
|
|
|
|
|
# |
4
|
|
|
|
|
|
|
# Redistribution and use in source and binary forms, with or without |
5
|
|
|
|
|
|
|
# modification, are permitted provided that the following conditions are met: |
6
|
|
|
|
|
|
|
# |
7
|
|
|
|
|
|
|
# * Redistributions of source code must retain the above copyright notice, |
8
|
|
|
|
|
|
|
# this list of conditions and the following disclaimer. |
9
|
|
|
|
|
|
|
# * Redistributions in binary form must reproduce the above copyright |
10
|
|
|
|
|
|
|
# notice, this list of conditions and the following disclaimer in the |
11
|
|
|
|
|
|
|
# documentation and/or other materials provided with the distribution. |
12
|
|
|
|
|
|
|
# |
13
|
|
|
|
|
|
|
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" |
14
|
|
|
|
|
|
|
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
15
|
|
|
|
|
|
|
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE |
16
|
|
|
|
|
|
|
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE |
17
|
|
|
|
|
|
|
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR |
18
|
|
|
|
|
|
|
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF |
19
|
|
|
|
|
|
|
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS |
20
|
|
|
|
|
|
|
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN |
21
|
|
|
|
|
|
|
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) |
22
|
|
|
|
|
|
|
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE |
23
|
|
|
|
|
|
|
# POSSIBILITY OF SUCH DAMAGE. |
24
|
|
|
|
|
|
|
package UAV::Pilot::Exception; |
25
|
|
|
|
|
|
|
$UAV::Pilot::Exception::VERSION = '1.3'; |
26
|
1
|
|
|
1
|
|
1678
|
use v5.14; |
|
1
|
|
|
|
|
2
|
|
27
|
1
|
|
|
1
|
|
6
|
use Moose; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
9
|
|
28
|
1
|
|
|
1
|
|
6689
|
use namespace::autoclean; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
10
|
|
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
with 'Throwable'; |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
has 'error' => ( |
33
|
|
|
|
|
|
|
is => 'rw', |
34
|
|
|
|
|
|
|
isa => 'Str', |
35
|
|
|
|
|
|
|
); |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
sub to_string |
38
|
|
|
|
|
|
|
{ |
39
|
0
|
|
|
0
|
0
|
|
my ($self) = @_; |
40
|
0
|
|
|
|
|
|
return $self->error; |
41
|
|
|
|
|
|
|
} |
42
|
|
|
|
|
|
|
|
43
|
1
|
|
|
1
|
|
131
|
no Moose; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
5
|
|
44
|
|
|
|
|
|
|
__PACKAGE__->meta->make_immutable; |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
package UAV::Pilot::NumberOutOfRangeException; |
48
|
|
|
|
|
|
|
$UAV::Pilot::NumberOutOfRangeException::VERSION = '1.3'; |
49
|
1
|
|
|
1
|
|
258
|
use v5.14; |
|
1
|
|
|
|
|
3
|
|
50
|
1
|
|
|
1
|
|
5
|
use Moose; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
6
|
|
51
|
1
|
|
|
1
|
|
6276
|
use namespace::autoclean; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
5
|
|
52
|
|
|
|
|
|
|
extends 'UAV::Pilot::Exception'; |
53
|
|
|
|
|
|
|
|
54
|
1
|
|
|
1
|
|
75
|
no Moose; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
4
|
|
55
|
|
|
|
|
|
|
__PACKAGE__->meta->make_immutable; |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
package UAV::Pilot::IOException; |
59
|
|
|
|
|
|
|
$UAV::Pilot::IOException::VERSION = '1.3'; |
60
|
1
|
|
|
1
|
|
239
|
use v5.14; |
|
1
|
|
|
|
|
4
|
|
61
|
1
|
|
|
1
|
|
6
|
use Moose; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
5
|
|
62
|
1
|
|
|
1
|
|
6134
|
use namespace::autoclean; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
5
|
|
63
|
|
|
|
|
|
|
extends 'UAV::Pilot::Exception'; |
64
|
|
|
|
|
|
|
|
65
|
1
|
|
|
1
|
|
95
|
no Moose; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
5
|
|
66
|
|
|
|
|
|
|
__PACKAGE__->meta->make_immutable; |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
package UAV::Pilot::FileNotFoundException; |
70
|
|
|
|
|
|
|
$UAV::Pilot::FileNotFoundException::VERSION = '1.3'; |
71
|
1
|
|
|
1
|
|
232
|
use v5.14; |
|
1
|
|
|
|
|
4
|
|
72
|
1
|
|
|
1
|
|
5
|
use Moose; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
5
|
|
73
|
1
|
|
|
1
|
|
6344
|
use namespace::autoclean; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
8
|
|
74
|
|
|
|
|
|
|
extends 'UAV::Pilot::IOException'; |
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
has 'file' => ( |
77
|
|
|
|
|
|
|
is => 'ro', |
78
|
|
|
|
|
|
|
isa => 'Str', |
79
|
|
|
|
|
|
|
); |
80
|
|
|
|
|
|
|
|
81
|
1
|
|
|
1
|
|
92
|
no Moose; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
4
|
|
82
|
|
|
|
|
|
|
__PACKAGE__->meta->make_immutable; |
83
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
package UAV::Pilot::CommandNotFoundException; |
86
|
|
|
|
|
|
|
$UAV::Pilot::CommandNotFoundException::VERSION = '1.3'; |
87
|
1
|
|
|
1
|
|
235
|
use v5.14; |
|
1
|
|
|
|
|
3
|
|
88
|
1
|
|
|
1
|
|
5
|
use Moose; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
5
|
|
89
|
1
|
|
|
1
|
|
6163
|
use namespace::autoclean; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
7
|
|
90
|
|
|
|
|
|
|
extends 'UAV::Pilot::IOException'; |
91
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
has 'cmd' => ( |
93
|
|
|
|
|
|
|
is => 'ro', |
94
|
|
|
|
|
|
|
isa => 'Str', |
95
|
|
|
|
|
|
|
); |
96
|
|
|
|
|
|
|
|
97
|
1
|
|
|
1
|
|
79
|
no Moose; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
6
|
|
98
|
|
|
|
|
|
|
__PACKAGE__->meta->make_immutable; |
99
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
|
101
|
|
|
|
|
|
|
package UAV::Pilot::NavPacketException::BadHeader; |
102
|
|
|
|
|
|
|
$UAV::Pilot::NavPacketException::BadHeader::VERSION = '1.3'; |
103
|
1
|
|
|
1
|
|
279
|
use v5.14; |
|
1
|
|
|
|
|
3
|
|
104
|
1
|
|
|
1
|
|
5
|
use Moose; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
5
|
|
105
|
1
|
|
|
1
|
|
6374
|
use namespace::autoclean; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
5
|
|
106
|
|
|
|
|
|
|
extends 'UAV::Pilot::Exception'; |
107
|
|
|
|
|
|
|
|
108
|
|
|
|
|
|
|
has 'got_header' => ( |
109
|
|
|
|
|
|
|
is => 'ro', |
110
|
|
|
|
|
|
|
isa => 'Int', |
111
|
|
|
|
|
|
|
); |
112
|
|
|
|
|
|
|
|
113
|
1
|
|
|
1
|
|
76
|
no Moose; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
5
|
|
114
|
|
|
|
|
|
|
__PACKAGE__->meta->make_immutable; |
115
|
|
|
|
|
|
|
|
116
|
|
|
|
|
|
|
|
117
|
|
|
|
|
|
|
package UAV::Pilot::VideoException; |
118
|
|
|
|
|
|
|
$UAV::Pilot::VideoException::VERSION = '1.3'; |
119
|
1
|
|
|
1
|
|
278
|
use v5.14; |
|
1
|
|
|
|
|
3
|
|
120
|
1
|
|
|
1
|
|
6
|
use Moose; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
5
|
|
121
|
1
|
|
|
1
|
|
6314
|
use namespace::autoclean; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
7
|
|
122
|
|
|
|
|
|
|
extends 'UAV::Pilot::Exception'; |
123
|
|
|
|
|
|
|
|
124
|
1
|
|
|
1
|
|
64
|
no Moose; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
5
|
|
125
|
|
|
|
|
|
|
__PACKAGE__->meta->make_immutable; |
126
|
|
|
|
|
|
|
|
127
|
|
|
|
|
|
|
|
128
|
|
|
|
|
|
|
package UAV::Pilot::ArdupilotPacketException::BadHeader; |
129
|
|
|
|
|
|
|
$UAV::Pilot::ArdupilotPacketException::BadHeader::VERSION = '1.3'; |
130
|
1
|
|
|
1
|
|
269
|
use v5.14; |
|
1
|
|
|
|
|
3
|
|
131
|
1
|
|
|
1
|
|
5
|
use Moose; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
5
|
|
132
|
1
|
|
|
1
|
|
6260
|
use namespace::autoclean; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
5
|
|
133
|
|
|
|
|
|
|
extends 'UAV::Pilot::Exception'; |
134
|
|
|
|
|
|
|
|
135
|
|
|
|
|
|
|
has 'got_header' => ( |
136
|
|
|
|
|
|
|
is => 'ro', |
137
|
|
|
|
|
|
|
isa => 'Int', |
138
|
|
|
|
|
|
|
); |
139
|
|
|
|
|
|
|
|
140
|
1
|
|
|
1
|
|
100
|
no Moose; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
6
|
|
141
|
|
|
|
|
|
|
__PACKAGE__->meta->make_immutable; |
142
|
|
|
|
|
|
|
|
143
|
|
|
|
|
|
|
|
144
|
|
|
|
|
|
|
package UAV::Pilot::ArdupilotPacketException::BadChecksum; |
145
|
|
|
|
|
|
|
$UAV::Pilot::ArdupilotPacketException::BadChecksum::VERSION = '1.3'; |
146
|
1
|
|
|
1
|
|
251
|
use v5.14; |
|
1
|
|
|
|
|
5
|
|
147
|
1
|
|
|
1
|
|
6
|
use Moose; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
4
|
|
148
|
1
|
|
|
1
|
|
6311
|
use namespace::autoclean; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
5
|
|
149
|
|
|
|
|
|
|
extends 'UAV::Pilot::Exception'; |
150
|
|
|
|
|
|
|
|
151
|
|
|
|
|
|
|
has 'got_checksum1' => ( |
152
|
|
|
|
|
|
|
is => 'ro', |
153
|
|
|
|
|
|
|
isa => 'Int', |
154
|
|
|
|
|
|
|
); |
155
|
|
|
|
|
|
|
has 'got_checksum2' => ( |
156
|
|
|
|
|
|
|
is => 'ro', |
157
|
|
|
|
|
|
|
isa => 'Int', |
158
|
|
|
|
|
|
|
); |
159
|
|
|
|
|
|
|
has 'expected_checksum1' => ( |
160
|
|
|
|
|
|
|
is => 'ro', |
161
|
|
|
|
|
|
|
isa => 'Int', |
162
|
|
|
|
|
|
|
); |
163
|
|
|
|
|
|
|
has 'expected_checksum2' => ( |
164
|
|
|
|
|
|
|
is => 'ro', |
165
|
|
|
|
|
|
|
isa => 'Int', |
166
|
|
|
|
|
|
|
); |
167
|
|
|
|
|
|
|
|
168
|
1
|
|
|
1
|
|
103
|
no Moose; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
5
|
|
169
|
|
|
|
|
|
|
__PACKAGE__->meta->make_immutable; |
170
|
|
|
|
|
|
|
|
171
|
|
|
|
|
|
|
|
172
|
|
|
|
|
|
|
1; |
173
|
|
|
|
|
|
|
__END__ |
174
|
|
|
|
|
|
|
|
175
|
|
|
|
|
|
|
|
176
|
|
|
|
|
|
|
=head1 NAME |
177
|
|
|
|
|
|
|
|
178
|
|
|
|
|
|
|
UAV::Pilot::Exceptions |
179
|
|
|
|
|
|
|
|
180
|
|
|
|
|
|
|
=head1 DESCRIPTION |
181
|
|
|
|
|
|
|
|
182
|
|
|
|
|
|
|
Exceptions that could be thrown by C<UAV::Pilot> modules. All inherit from |
183
|
|
|
|
|
|
|
C<UAV::Pilot::Exception>, which does the role C<Throwable>. |
184
|
|
|
|
|
|
|
|
185
|
|
|
|
|
|
|
=head1 EXCEPTIONS |
186
|
|
|
|
|
|
|
|
187
|
|
|
|
|
|
|
=head2 UAV::Pilot::NumberOutOfRangeException |
188
|
|
|
|
|
|
|
|
189
|
|
|
|
|
|
|
=head2 UAV::Pilot::IOException |
190
|
|
|
|
|
|
|
|
191
|
|
|
|
|
|
|
=head2 UAV::Pilot::CommandNotFoundException |
192
|
|
|
|
|
|
|
|
193
|
|
|
|
|
|
|
=head2 UAV::Pilot::NavPacketException::BadHeader |
194
|
|
|
|
|
|
|
|
195
|
|
|
|
|
|
|
=head2 UAV::Pilot::VideoException |
196
|
|
|
|
|
|
|
|
197
|
|
|
|
|
|
|
=head2 UAV::Pilot::ArdupilotPacketException::BadHeader |
198
|
|
|
|
|
|
|
|
199
|
|
|
|
|
|
|
=head2 UAV::Pilot::ArdupilotPacketException::BadChecksum |
200
|
|
|
|
|
|
|
|
201
|
|
|
|
|
|
|
=cut |