You are here

function xmlrpc_server_server_error in Services 5

Same name and namespace in other branches
  1. 6 servers/xmlrpc_server/xmlrpc_server.module \xmlrpc_server_server_error()
  2. 6.2 servers/xmlrpc_server/xmlrpc_server.module \xmlrpc_server_server_error()
  3. 7 servers/xmlrpc_server/xmlrpc_server.module \xmlrpc_server_server_error()

File

servers/xmlrpc_server/xmlrpc_server.module, line 34
The module which implements an xml-rpc server for the services module

Code

function xmlrpc_server_server_error($message) {
  if (!is_array($message)) {
    $message = array(
      $message,
    );
  }
  $message = implode(' ', $message);
  $matches = array();
  if (preg_match("/\\#(\\d+)/", $message, $matches)) {
    $code = $matches[1];
  }
  else {
    $code = 1;
  }
  return xmlrpc_error($code, strip_tags($message));
}