Max Kanat-Alexander > RPC-Any-1.00 > RPC::Any::Exception

Download:
RPC-Any-1.00.tar.gz

Dependencies

Annotate this POD

CPAN RT

New  2
Open  1
View/Report Bugs
Source  

NAME ^

RPC::Any::Exception - A throwable exception object for RPC::Any

SYNOPSIS ^

 use RPC::Any::Exception;
 die RPC::Any::Exception(code => 1234, message => "I'm dead!");

DESCRIPTION ^

This object represents an exception that an RPC::Any::Server can throw. See "ERROR HANDLING" in RPC::Any::Server for information about how to use this in your own code.

BUILT-IN ERRORS ^

There are various types of built-in errors that an RPC::Any::Server can throw. They have specific error codes that correlate with the error codes specified at http://xmlrpc-epi.sourceforge.net/specs/rfc.fault_codes.php (which are valid for both JSON-RPC and XML-RPC).

What follows is a brief description of each type of error (which is a subclass of RPC::Any::Exception) and its numeric code:

RPC::Any::Exception::PerlError

Code: -32603

Something called "die" with something that wasn't an RPC::Any::Exception. This is just a basic Perl error. The message will be the error that "die" threw.

RPC::Any::Exception::HTTPError

Code: -32300

There was a problem with the HTTP protocol on the input. The message will have more details.

RPC::Any::Exception::ParseError

Code: -32700

There was an error parsing the input for the RPC protocol. The message will have more details.

RPC::Any::Exception::NoSuchMethod

Code: -32601

The RPC request contained an invalid method. The message will have more details.

syntax highlighting: