File tree Expand file tree Collapse file tree 2 files changed +13
-0
lines changed Expand file tree Collapse file tree 2 files changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -43,6 +43,8 @@ enable each of them separately.
4343 You should never enable the debug tools, except for the error handler, in a
4444 production environment as they might disclose sensitive information to the user.
4545
46+ .. _turning-php-errors-into-exceptions :
47+
4648Turning PHP Errors into Exceptions
4749----------------------------------
4850
Original file line number Diff line number Diff line change @@ -118,6 +118,17 @@ store the HTTP status code and message respectively.
118118 and its required ``getStatusCode() `` method. Otherwise, the ``status_code ``
119119 will default to ``500 ``.
120120
121+ Additionally you have access to the Exception with ``exception ``, which for example
122+ allows you to output the stack trace using ``{{ exception.traceAsString }} `` or
123+ access any other method on the object. You should be careful with this though,
124+ as this is very likely to expose sensitive data.
125+
126+ .. tip ::
127+
128+ PHP errors are turned into exceptions as well by default, so you can also access these
129+ error details using ``exception ``. For more on this see
130+ :ref: `Turning PHP Errors into Exceptions <turning-php-errors-into-exceptions >`
131+
121132Security & 404 Pages
122133--------------------
123134
You can’t perform that action at this time.
0 commit comments