1. services
    1. 5 services.module
    2. 7.3
    3. 7 services.module
    4. 6 services.module
    5. 6.2 services.module
    6. 6.3
5 services_error($message)
6.2 services_error($message, $code = 0, $exception = NULL)
7.3 – 6.3 services_error($message, $code = 0, $data = NULL)
6 services_error($message)
7 services_error($message, $code = 0, $exception = NULL)

Prepare an error message for returning to the server.


string $message Error message.

int $code Optional. Error code. This often maps to the HTTP status codes. Defaults to 0.

mixed $data Optional. Information that can be used by the server to return information about the error. Defaults to null.

Return value


▾ 29 functions call services_error()

RESTServer::fileRecieve in servers/rest_server/includes/
RESTServer::getControllerArguments in servers/rest_server/includes/
Parses controller arguments from request
RESTServer::handle in servers/rest_server/includes/
Handles the call to the REST server
RESTServer::parseRequest in servers/rest_server/includes/
services_controller_execute in ./
Performs access checks and executes a services controller. This method is called by server implementations.
services_resource_execute_index_query in ./services.module
Helper function to execute a index query.
taxonomy_service_get_tree in resources/
Services interface to taxonomy_get_tree().
taxonomy_service_select_nodes in resources/
Services interface to taxonomy_select_nodes().
xmlrpc_server_call_wrapper in servers/xmlrpc_server/xmlrpc_server.module
Pass XMLRPC server requests to the appropriate services method.
_comment_resource_access in resources/
Access check callback for comment controllers.
_comment_resource_create in resources/
_comment_resource_delete in resources/
Delete a comment.
_comment_resource_update in resources/
Updates a comment and returns the cid.
_file_resource_access in resources/
Access check callback for file controllers.
_file_resource_create in resources/
Adds a new file and returns the fid.
_file_resource_create_raw in resources/
Adds new files and returns the files array.
_node_resource_access in resources/
Determine whether the current user can access a node resource.
_node_resource_create in resources/
Creates a new node based on submitted values.
_node_resource_update in resources/
Updates a new node based on submitted values.
_node_resource_validate_type in resources/
_taxonomy_resource_delete_access in resources/
Access callback for term deleting.
_taxonomy_resource_update_access in resources/
Access callback for term updating.
_user_resource_access in resources/
Access check callback for user resource.
_user_resource_create in resources/
Create a new user.
_user_resource_delete in resources/
Delete a user.
_user_resource_login in resources/
Login a user using the specified credentials.
_user_resource_logout in resources/
Logout the current user.
_user_resource_retrieve in resources/
Get user details.
_user_resource_update in resources/
Update an existing user.


./, line 329

function services_error($message, $code = 0, $data = NULL) {
  throw new ServicesException($message, $code, $data);