File tree Expand file tree Collapse file tree 3 files changed +11
-0
lines changed Expand file tree Collapse file tree 3 files changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -1266,6 +1266,7 @@ View Config Options
12661266 'layout_prefix' => null,
12671267 'include_prefix' => null,
12681268 'show_debug_comments' => true,
1269+ 'throw_exceptions_in_destructor' => true,
12691270 ],
12701271 ],
12711272 ]
@@ -1296,6 +1297,12 @@ show_debug_comments
12961297
12971298Set to ``false `` to disable HTML comments when in debug mode.
12981299
1300+ throw_exceptions_in_destructor
1301+ """"""""""""""""""""""""""""""
1302+
1303+ Set ``false `` to not throw exceptions in the class destructor. The default is to
1304+ throw. Disabling this will help you debug exceptions thrown inside views.
1305+
12991306Extending
13001307#########
13011308
Original file line number Diff line number Diff line change @@ -1432,6 +1432,9 @@ protected static function setView(string $instance) : View
14321432 if (isset ($ config ['show_debug_comments ' ]) && $ config ['show_debug_comments ' ] === false ) {
14331433 $ service ->disableDebugComments ();
14341434 }
1435+ if (isset ($ config ['throw_exceptions_in_destructor ' ])) {
1436+ $ service ->setThrowExceptionsInDestructor ($ config ['throw_exceptions_in_destructor ' ]);
1437+ }
14351438 return static ::setService ('view ' , $ service , $ instance );
14361439 }
14371440
Original file line number Diff line number Diff line change 1414 'layout_prefix ' => '' ,
1515 'include_prefix ' => '' ,
1616 'show_debug_comments ' => false ,
17+ 'throw_exceptions_in_destructor ' => false ,
1718 ],
1819];
You can’t perform that action at this time.
0 commit comments