File tree Expand file tree Collapse file tree
src/Illuminate/Foundation/Exceptions Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1313use Illuminate \Support \Facades \Auth ;
1414use Illuminate \Support \Facades \View ;
1515use Illuminate \Support \ViewErrorBag ;
16+ use Whoops \Handler \HandlerInterface ;
1617use Illuminate \Http \RedirectResponse ;
1718use Illuminate \Auth \AuthenticationException ;
1819use Illuminate \Contracts \Container \Container ;
2425use Symfony \Component \Debug \Exception \FlattenException ;
2526use Illuminate \Database \Eloquent \ModelNotFoundException ;
2627use Symfony \Component \HttpKernel \Exception \HttpException ;
28+ use Illuminate \Contracts \Container \BindingResolutionException ;
2729use Symfony \Component \Console \Application as ConsoleApplication ;
2830use Symfony \Component \HttpFoundation \Response as SymfonyResponse ;
2931use Symfony \Component \HttpKernel \Exception \NotFoundHttpException ;
@@ -350,7 +352,11 @@ protected function renderExceptionWithWhoops(Exception $e)
350352 */
351353 protected function whoopsHandler ()
352354 {
353- return (new WhoopsHandler )->forDebug ();
355+ try {
356+ return app (HandlerInterface::class);
357+ } catch (BindingResolutionException $ e ) {
358+ return (new WhoopsHandler )->forDebug ();
359+ }
354360 }
355361
356362 /**
You can’t perform that action at this time.
0 commit comments