You are here

function services_error in Services 6.3

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

Prepare an error message for returning to the server.

Parameters

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

mixed

29 calls to services_error()
RESTServer::fileRecieve in servers/rest_server/includes/RESTServer.inc
RESTServer::getControllerArguments in servers/rest_server/includes/RESTServer.inc
Parses controller arguments from request
RESTServer::handle in servers/rest_server/includes/RESTServer.inc
Handles the call to the REST server
RESTServer::parseRequest in servers/rest_server/includes/RESTServer.inc
services_controller_execute in ./services.runtime.inc
Performs access checks and executes a services controller. This method is called by server implementations.

... See full list

File

./services.runtime.inc, line 342
Contains functions that only are necessary when a service call is made. This has broken out so that this code isn't loaded for every page load.

Code

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