Skip to content

Commit 8047699

Browse files
committed
docs: add about default error view files
1 parent c65e05d commit 8047699

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

user_guide_src/source/general/errors.rst

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -197,16 +197,22 @@ HTTP Status Code and Error Views
197197
================================
198198

199199
The exception handler displays the error view corresponding to the HTTP status
200-
code, if it exists.
200+
code, if one exists.
201201

202202
For example, ``PageNotFoundException`` implements the ``HTTPExceptionInterface``,
203203
so its exception code ``404`` will be the HTTP status code. Therefore if it is
204204
thrown, the system will show the **error_404.php** in the **app/Views/errors/html**
205205
folder when it is a web request. If it is invoked via CLI, the system will show
206206
the **error_404.php** in the **app/Views/errors/cli** folder.
207207

208-
You should customize all of the error views in the **app/Views/error** folder for
209-
your site.
208+
If there is no view file corresponding to the HTTP status code, **production.php**
209+
or **error_exception.php** will be displayed.
210+
211+
.. note:: If ``display_errors`` is on in the PHP INI configuration,
212+
**error_exception.php** is selected and a detailed error report is displayed.
213+
214+
You should customize all of the error views in the **app/Views/errors/html** folder
215+
for your site.
210216

211217
You can also create error views for specific HTTP status code. For example, if
212218
you want to create an error view for "400 Bad Request", add **error_400.php**.

0 commit comments

Comments
 (0)