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.
43
43
You should never enable the debug tools, except for the error handler, in a
44
44
production environment as they might disclose sensitive information to the user.
45
45
46
+ .. _turning-php-errors-into-exceptions :
47
+
46
48
Turning PHP Errors into Exceptions
47
49
----------------------------------
48
50
Original file line number Diff line number Diff line change @@ -118,6 +118,17 @@ store the HTTP status code and message respectively.
118
118
and its required ``getStatusCode() `` method. Otherwise, the ``status_code ``
119
119
will default to ``500 ``.
120
120
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
+
121
132
Security & 404 Pages
122
133
--------------------
123
134
You can’t perform that action at this time.
0 commit comments