function xmlrpc_error

Generates, temporarily saves, and returns an XML-RPC error object.

Parameters

$code: The error code.

$message: The error message.

$reset: TRUE to empty the temporary error storage. Ignored if $code is supplied.

Return value

object An XML-RPC error object representing $code and $message, or the most recently stored error object if omitted.

8 calls to xmlrpc_error()
xmlrpc_clear_error in includes/xmlrpc.inc
Clears any previously-saved errors.
xmlrpc_errno in includes/xmlrpc.inc
Returns the last XML-RPC client error number.
xmlrpc_error_msg in includes/xmlrpc.inc
Returns the last XML-RPC client error message.
xmlrpc_server_call in includes/xmlrpcs.inc
Dispatches an XML-RPC request and any parameters to the appropriate handler.
xmlrpc_server_error in includes/xmlrpcs.inc
Throws an XML-RPC error.

... See full list

File

includes/xmlrpc.inc, line 438

Code

function xmlrpc_error($code = NULL, $message = NULL, $reset = FALSE) {
    static $xmlrpc_error;
    if (isset($code)) {
        $xmlrpc_error = new stdClass();
        $xmlrpc_error->is_error = TRUE;
        $xmlrpc_error->code = $code;
        $xmlrpc_error->message = $message;
    }
    elseif ($reset) {
        $xmlrpc_error = NULL;
    }
    return $xmlrpc_error;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.