On this page
function xmlrpc_error
xmlrpc_error($code = NULL, $message = NULL, $reset = FALSE)
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.
File
- 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;
}
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/includes!xmlrpc.inc/function/xmlrpc_error/7.x