class RestWSException in RESTful Web Services 7
Same name and namespace in other branches
- 7.2 restws.module \RestWSException
An exception defining the HTTP error code and message.
Hierarchy
- class \RestWSException extends \Exception
Expanded class hierarchy of RestWSException
File
- ./
restws.module, line 156 - RESTful web services module.
View source
class RestWSException extends Exception {
public function getHTTPError() {
$code = $this
->getCode();
switch ($code) {
case 403:
return '403 Forbidden';
case 404:
return '404 Not Found';
case 406:
return '406 Not Acceptable';
case 422:
return '422 Unprocessable Entity';
default:
return '500 Internal Server Error';
}
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
RestWSException:: |
public | function |