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 drupal/includes/xmlrpc.inc
Clears any previously-saved errors.
xmlrpc_errno in drupal/includes/xmlrpc.inc
Returns the last XML-RPC client error number.
xmlrpc_error_msg in drupal/includes/xmlrpc.inc
Returns the last XML-RPC client error message.
xmlrpc_server_call in drupal/includes/xmlrpcs.inc
Dispatches an XML-RPC request and any parameters to the appropriate handler.
xmlrpc_server_error in drupal/includes/xmlrpcs.inc
Throws an XML-RPC error.

... See full list

File

drupal/includes/xmlrpc.inc, line 438
Drupal XML-RPC library.

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;
}