1JSON::RPC::Common::ProcUesdeurreC:o:nRtertiJubSruOntN:e::d:ERrPPreCor:rl:(C3Do)omcmuomne:n:tPartoicoendure::Return::Error(3)
2
3
4
6 JSON::RPC::Common::Procedure::Return::Error - Base class for JSON-RPC
7 errors
8
10 use JSON::RPC::Common::Procedure::Return::Error;
11
12 my $error = JSON::RPC::Common::Procedure::Return::Error->new(
13 message => "foo",
14 code => "bah",
15 );
16
17 # or construct a return with an error from a call:
18 my $return = $call->return_error("foo");
19
20 $return->error->message;
21
23 This is a base class for all version specific error implementations.
24
26 code
27 message
28 data
29 These are the three common JSON-RPC error fields. In JSON-RPC 1.1
30 "data" is known as "error", and in 1.0 none of this is specced at
31 all.
32
33 See the version specific subclasses for various behaviors.
34
35 Code is an integer, and message is a string.
36
38 new_dwim
39 Convenience constructor used by "return_error" in
40 JSON::RPC::Common::Procedure::Call.
41
42 Will return an object if that's the argument, and otherwise
43 construct an error.
44
45 inflate
46 Create an error object from JSON data (not text).
47
48 In order to maximize compatibility this inflation routine is very
49 liberal in what it accepts.
50
51
52
53perl v5.12.0 JS2O0N0:9:-R0P1C-:1:0Common::Procedure::Return::Error(3)