Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/laravel/10.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/security/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
处理程序中的Laravel dontReport不工作_Laravel_Laravel 5_Exception Handling_Laravel 5.2 - Fatal编程技术网

处理程序中的Laravel dontReport不工作

处理程序中的Laravel dontReport不工作,laravel,laravel-5,exception-handling,laravel-5.2,Laravel,Laravel 5,Exception Handling,Laravel 5.2,处理程序文件中的Laravel dontReport无法运行以下dontReport代码 protected $dontReport = [ Illuminate\Auth\AuthenticationException::class, Illuminate\Auth\Access\AuthorizationException::class, Symfony\Component\HttpKernel\Exception\HttpException::class,

处理程序文件中的Laravel dontReport无法运行以下dontReport代码

protected $dontReport = [
    Illuminate\Auth\AuthenticationException::class,
    Illuminate\Auth\Access\AuthorizationException::class,
    Symfony\Component\HttpKernel\Exception\HttpException::class,
    Illuminate\Database\Eloquent\ModelNotFoundException::class,
    Illuminate\Session\TokenMismatchException::class,
    Illuminate\Validation\ValidationException::class,
    Illuminate\View\View::class,
    Illuminate\Routing\RouteCollection::class,
    Illuminate\Foundation\Http\Middleware\VerifyCsrfToken::class,
    Illuminate\Session\Middleware\StartSession::class,
];

尝试在您的
报告中添加此代码
方法:

if($this->shouldReport($exception) {
    // Send email
}

您也可以考虑检查环境,如果在同一if语句中存在异常消息。

向问题添加更多上下文。例如,您正在尝试做什么以及到目前为止您已经实现了什么。我正在为laravel项目实现错误/异常报告,当出现异常/错误时,当时该异常/错误通过邮件报告,但该邮件包含我要从邮件中排除的所有异常/错误。是否有其他方法来处理此类错误issue@satish:父类
illumb\Foundation\Exceptions\Handler.php
使用相同的方法,因此我希望框架不会为此提供额外的魔力。