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
1266
1266
'layout_prefix' => null,
1267
1267
'include_prefix' => null,
1268
1268
'show_debug_comments' => true,
1269
+ 'throw_exceptions_in_destructor' => true,
1269
1270
],
1270
1271
],
1271
1272
]
@@ -1296,6 +1297,12 @@ show_debug_comments
1296
1297
1297
1298
Set to ``false `` to disable HTML comments when in debug mode.
1298
1299
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
+
1299
1306
Extending
1300
1307
#########
1301
1308
Original file line number Diff line number Diff line change @@ -1432,6 +1432,9 @@ protected static function setView(string $instance) : View
1432
1432
if (isset ($ config ['show_debug_comments ' ]) && $ config ['show_debug_comments ' ] === false ) {
1433
1433
$ service ->disableDebugComments ();
1434
1434
}
1435
+ if (isset ($ config ['throw_exceptions_in_destructor ' ])) {
1436
+ $ service ->setThrowExceptionsInDestructor ($ config ['throw_exceptions_in_destructor ' ]);
1437
+ }
1435
1438
return static ::setService ('view ' , $ service , $ instance );
1436
1439
}
1437
1440
Original file line number Diff line number Diff line change 14
14
'layout_prefix ' => '' ,
15
15
'include_prefix ' => '' ,
16
16
'show_debug_comments ' => false ,
17
+ 'throw_exceptions_in_destructor ' => false ,
17
18
],
18
19
];
You can’t perform that action at this time.
0 commit comments