CHttpException
CHttpException represents an exception caused by invalid operations of end-users.
The HTTP error code can be obtained via
statusCode.
Error handlers may use this status code to decide how to format the error page.
Protected Properties
Hide inherited properties
Property | Type | Description | Defined By |
code |
|
|
Exception |
file |
|
|
Exception |
line |
|
|
Exception |
message |
|
|
Exception |
Public Methods
Hide inherited methods
Method | Description | Defined By |
__construct() |
Constructor. |
CHttpException |
__toString() |
|
Exception |
__wakeup() |
|
Exception |
getCode() |
|
Exception |
getFile() |
|
Exception |
getLine() |
|
Exception |
getMessage() |
|
Exception |
getPrevious() |
|
Exception |
getTrace() |
|
Exception |
getTraceAsString() |
|
Exception |
Property Details
public integer $statusCode;
HTTP status code, such as 403, 404, 500, etc.
Method Details
public void __construct(integer $status, string $message=NULL, integer $code=0)
|
$status |
integer |
HTTP status code, such as 404, 500, etc. |
$message |
string |
error message |
$code |
integer |
error code |
Constructor.
just for reference
HTTPError HTTPClientError 400 - HTTPBadRequest 401 - HTTPUnauthorized 402 - HTTPPaymentRequired 403 - HTTPForbidden 404 - HTTPNotFound 405 - HTTPMethodNotAllowed 406 - HTTPNotAcceptable 407 - HTTPProxyAuthenticationRequired 408 - HTTPRequestTimeout 409 - HTTPConfict 410 - HTTPGone 411 - HTTPLengthRequired 412 - HTTPPreconditionFailed 413 - HTTPRequestEntityTooLarge 414 - HTTPRequestURITooLong 415 - HTTPUnsupportedMediaType 416 - HTTPRequestRangeNotSatisfiable 417 - HTTPExpectationFailed HTTPServerError 500 - HTTPInternalServerError 501 - HTTPNotImplemented 502 - HTTPBadGateway 503 - HTTPServiceUnavailable 504 - HTTPGatewayTimeout 505 - HTTPVersionNotSupported
Signup or Login in order to comment.