line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package RPC::Lite::Error; |
2
|
|
|
|
|
|
|
|
3
|
3
|
|
|
3
|
|
13
|
use strict; |
|
3
|
|
|
|
|
5
|
|
|
3
|
|
|
|
|
93
|
|
4
|
3
|
|
|
3
|
|
15
|
use base qw(RPC::Lite::Response); |
|
3
|
|
|
|
|
4
|
|
|
3
|
|
|
|
|
560
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
=pod |
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
=head1 NAME |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
RPC::Lite::Error -- An error response from an RPC::Lite::Server. |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
=head1 DESCRIPTION |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
RPC::Lite::Error derives from RPC::Lite::Response, but instead of |
15
|
|
|
|
|
|
|
having a valid object in the Result field, it has error information |
16
|
|
|
|
|
|
|
in the Error field. |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
=head1 METHODS |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
=over 4 |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
=item C |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
Takes the object to place in the Error field. |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
=cut |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
sub new |
29
|
|
|
|
|
|
|
{ |
30
|
0
|
|
|
0
|
1
|
|
my ($class, $data) = @_; |
31
|
|
|
|
|
|
|
|
32
|
0
|
|
|
|
|
|
my $self = bless {}, $class; |
33
|
0
|
|
|
|
|
|
$self->Error($data); |
34
|
|
|
|
|
|
|
|
35
|
0
|
|
|
|
|
|
return $self; |
36
|
|
|
|
|
|
|
} |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
=pod |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
=item C |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
Returns undef on an RPC::Lite::Error object. |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
=cut |
45
|
|
|
|
|
|
|
|
46
|
0
|
|
|
0
|
1
|
|
sub Result { return undef } |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
=pod |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
=item C |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
Returns the object encapsulated by the RPC::Lite::Error object. |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
=cut |
55
|
|
|
|
|
|
|
|
56
|
0
|
0
|
|
0
|
1
|
|
sub Error { $_[0]->{error} = $_[1] if @_>1; $_[0]->{error} } |
|
0
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
=pod |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
=back |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
=head1 SEE ALSO |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
RPC::Lite::Response |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
=cut |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
1; |