public function ServicesException::__construct in Services 6.3
Same name and namespace in other branches
- 7.3 includes/services.runtime.inc \ServicesException::__construct()
Constructor for the ServicesException.
Parameters
string $message: Error message.
int $code: Optional. Error code. This often maps to the HTTP status codes. Defaults to 0.
mixed $data: Information that can be used by the server to return information about the error.
1 call to ServicesException::__construct()
- ServicesArgumentException::__construct in ./
services.runtime.inc - Constructor for the ServicesException.
1 method overrides ServicesException::__construct()
- ServicesArgumentException::__construct in ./
services.runtime.inc - Constructor for the ServicesException.
File
- ./
services.runtime.inc, line 28 - 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.
Class
- ServicesException
- A exception thrown by services and related modules when something goes wrong.
Code
public function __construct($message, $code = 0, $data = NULL) {
parent::__construct($message, $code);
$this->data = !empty($data) ? $data : $message;
}