You are here

function xmlrpc_server_error in Drupal 7

Same name and namespace in other branches
  1. 4 includes/xmlrpcs.inc \xmlrpc_server_error()
  2. 5 includes/xmlrpcs.inc \xmlrpc_server_error()
  3. 6 includes/xmlrpcs.inc \xmlrpc_server_error()

Throws an XML-RPC error.

Parameters

$error: An error object or integer error code.

$message: (optional) The description of the error. Used only if an integer error code was passed in.

1 call to xmlrpc_server_error()
xmlrpc_server in includes/xmlrpcs.inc
Invokes XML-RPC methods on this server.

File

includes/xmlrpcs.inc, line 113
Provides API for defining and handling XML-RPC requests.

Code

function xmlrpc_server_error($error, $message = FALSE) {
  if ($message && !is_object($error)) {
    $error = xmlrpc_error($error, $message);
  }
  xmlrpc_server_output(xmlrpc_error_get_xml($error));
}