The title is pretty self explaining: How can make sure that normal PHP error like trying to output an undefined variable.
echo $a; // ErrorException: Undefined variable: a
In PHP this would just be an Error, however in laravel errors get escalated to ErrorException which halt execution. How can I disable this. I tried
app/Exceptions/Handler.php
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\Exception\ErrorException::class, // added this
\ErrorException::class, // and this
];
This question is related to my earlier question, but I thought of using another approach that might work better.
What I try to achieve is that just like with Errors the code does not stop executing but continues to run as well as it can.