55 words, 1 min read
You can stop Laravel from reporting certain exceptions by having your custom exception class implement the ShouldntReport
interface, instead of just adding it to the $dontReport
array. This approach keeps the behavior self-contained and clear within the exception itself.
namespace App\Exceptions;
use Exception;
use Illuminate\Contracts\Debug\ShouldntReport;
class PodcastProcessingException extends Exception implements ShouldntReport
{
//
}
If this post was enjoyable or useful for you, please share it! If you have comments, questions, or feedback, you can email my personal email. To get new posts, subscribe use the RSS feed.