You are here

function services_error in Services 7

Same name and namespace in other branches
  1. 5 services.module \services_error()
  2. 6.3 services.runtime.inc \services_error()
  3. 6 services.module \services_error()
  4. 6.2 services.module \services_error()
  5. 7.3 includes/services.runtime.inc \services_error()

Prepare an error message for returning to the server.

22 calls to services_error()
comment_service_save in services/comment_service/comment_service.inc
Adds a new comment to a node and returns the cid.
file_service_get in services/file_service/file_service.inc
Get all elements from a given file
file_service_get_node_files in services/file_service/file_service.inc
Generates an array of base64 encoded files attached to a node
file_service_save in services/file_service/file_service.inc
Save file information.
node_service_get in services/node_service/node_service.inc
Returns a specified node.

... See full list

File

./services.module, line 188
@author Services Dev Team

Code

function services_error($message, $code = 0, $exception = NULL) {
  $server_info = services_get_server_info();

  // Look for custom error handling function.
  // Should be defined in each server module.
  if ($server_info && module_hook($server_info->module, 'server_error')) {
    return module_invoke($server_info->module, 'server_error', $message, $code, $exception);
  }

  // No custom error handling function found.
  return $message;
}