This article mainly introduces you about the Laravel 5 exception error: Fatalerrorexception in the handler.php Line 38 solution, the article will introduce the solution is very detailed, the need for friends can reference, Follow the small series to learn together.
Objective
This article mainly introduces to you about the LARAVEL5 exception error fatalerrorexception in the handler.php line 38 solution, shares out for everybody reference study, words not to say, come together to see the detailed introduction.
1. Error hints
Fatalerrorexception in handler.php line 38:uncaught typeerror:argument 1 passed to App\exceptions\handler::report () must Be a instance of Exception, instance of Error given, called in D:\www\activity\vendor\compiled.php on line 1817 and Defi Ned in D:\www\activity\app\exceptions\handler.php:38stack Trace: #0 D:\www\activity\vendor\compiled.php (1817): App\ Exceptions\handler->report (Object (Error)) #1 [internal function]: illuminate\foundation\bootstrap\ Handleexceptions->handleexception (Object (Error)) #2 {Main}thrown
Reason: d:wwwactivityvendorcompiled.php on line 1817 variable $e is not an instance object of exception (translation of error hints ... ^.^ laughter cry)
2. Solutions
In the wrong place of the hint with the example of variable $e, if it is not the exception type, the new one
if (! $e instanceof \exception) {$e = new Fatalthrowableerror ($e);}
What it looks like when new is finished:
Public Function HandleException ($e) {if (! $e instanceof \exception) { $e = new Fatalthrowableerror ($e);} $this->ge Texceptionhandler ()->report ($e); if ($this->app->runninginconsole ()) { $this->renderforconsole ($e);} else { $this- Renderhttpresponse ($e); }}
Summarize