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 version 0.11
11
13 use JSON::RPC::Common::Procedure::Return::Error;
14
15 my $error = JSON::RPC::Common::Procedure::Return::Error->new(
16 message => "foo",
17 code => "bah",
18 );
19
20 # or construct a return with an error from a call:
21 my $return = $call->return_error("foo");
22
23 $return->error->message;
24
26 This is a base class for all version specific error implementations.
27
29 code
30 message
31 data
32 These are the three common JSON-RPC error fields. In JSON-RPC 1.1
33 "data" is known as "error", and in 1.0 none of this is specced at
34 all.
35
36 See the version specific subclasses for various behaviors.
37
38 Code is an integer, and message is a string.
39
41 new_dwim
42 Convenience constructor used by "return_error" in
43 JSON::RPC::Common::Procedure::Call.
44
45 Will return an object if that's the argument, and otherwise
46 construct an error.
47
48 inflate
49 Create an error object from JSON data (not text).
50
51 In order to maximize compatibility this inflation routine is very
52 liberal in what it accepts.
53
55 Yuval Kogman <nothingmuch@woobling.org>
56
58 This software is copyright (c) 2014 by Yuval Kogman and others.
59
60 This is free software; you can redistribute it and/or modify it under
61 the same terms as the Perl 5 programming language system itself.
62
63
64
65perl v5.38.0 JS2O0N2:3:-R0P7C-:2:0Common::Procedure::Return::Error(3)