How I make a Laravel Job to fail without restarting so I can use sentry to log the exception?

Dimitrios Desyllas - Apr 6 '20 - - Dev Community

I want to be able to log exceptions into sentry but in a manner that also won't make my job to spawn like an overlord's minion.

In my multi-server application I use laravel's Queueing system in order to run background jobs. Sometimes in my logic I want to make my job to throw an exception so I can log it via a sentry using the laravel library that offers.

So in my job:

namespace App\Jobs;

use

Can you help me with that?

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Terabox Video Player