HttpException represents an exception caused by an improper request of the end-user.
HttpException can be differentiated via its $statusCode property value which keeps a standard HTTP status code (e.g. 404, 500). Error handlers may use this status code to decide how to format the error page.
Throwing an HttpException like in the following example will result in the 404 page to be displayed.
if ($item === null) { // item does not exist
throw new \yii\web\HttpException(404, 'The requested Item could not be found.');
}
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4