Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yii2
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
PSDI Army
yii2
Commits
88dabc49
Commit
88dabc49
authored
Sep 30, 2014
by
Qiang Xue
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
typo fix [skip ci]
parent
29a5cd20
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
11 deletions
+11
-11
runtime-responses.md
docs/guide/runtime-responses.md
+11
-11
No files found.
docs/guide/runtime-responses.md
View file @
88dabc49
...
...
@@ -34,17 +34,17 @@ When the [error handler](runtime-handling-errors.md) catches an exception, it wi
from the exception and assign it to the response. For the
[
[yii\web\NotFoundHttpException
]
] above, it is
associated with the HTTP status 404. The following HTTP exceptions are predefined in Yii:
*
[
[yi\web\BadRequestHttpException
]
]: status code 400.
*
[
[yi\web\ConflictHttpException
]
]: status code 409.
*
[
[yi\web\ForbiddenHttpException
]
]: status code 403.
*
[
[yi\web\GoneHttpException
]
]: status code 410.
*
[
[yi\web\MethodNotAllowedHttpException
]
]: status code 405.
*
[
[yi\web\NotAcceptableHttpException
]
]: status code 406.
*
[
[yi\web\NotFoundHttpException
]
]: status code 404.
*
[
[yi\web\ServerErrorHttpException
]
]: status code 500.
*
[
[yi\web\TooManyRequestsHttpException
]
]: status code 429.
*
[
[yi\web\UnauthorizedHttpException
]
]: status code 401.
*
[
[yi\web\UnsupportedMediaTypeHttpException
]
]: status code 415.
*
[
[yi
i
\web\BadRequestHttpException
]
]: status code 400.
*
[
[yi
i
\web\ConflictHttpException
]
]: status code 409.
*
[
[yi
i
\web\ForbiddenHttpException
]
]: status code 403.
*
[
[yi
i
\web\GoneHttpException
]
]: status code 410.
*
[
[yi
i
\web\MethodNotAllowedHttpException
]
]: status code 405.
*
[
[yi
i
\web\NotAcceptableHttpException
]
]: status code 406.
*
[
[yi
i
\web\NotFoundHttpException
]
]: status code 404.
*
[
[yi
i
\web\ServerErrorHttpException
]
]: status code 500.
*
[
[yi
i
\web\TooManyRequestsHttpException
]
]: status code 429.
*
[
[yi
i
\web\UnauthorizedHttpException
]
]: status code 401.
*
[
[yi
i
\web\UnsupportedMediaTypeHttpException
]
]: status code 415.
If the exception that you want to throw is not among the above list, you may create one by extending
from
[
[yii\web\HttpException
]
], or directly throw it with a status code, for example,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment