| 1 |
<?php |
| 2 |
|
| 3 |
namespace SyncBasalam\Jobs\Exceptions; |
| 4 |
|
| 5 |
use Exception; |
| 6 |
|
| 7 |
defined('ABSPATH') || exit; |
| 8 |
|
| 9 |
abstract class JobException extends Exception |
| 10 |
{ |
| 11 |
abstract public function shouldRetry(): bool; |
| 12 |
|
| 13 |
public function getErrorContext(): array |
| 14 |
{ |
| 15 |
return [ |
| 16 |
'message' => $this->getMessage(), |
| 17 |
'code' => $this->getCode(), |
| 18 |
'file' => $this->getFile(), |
| 19 |
'line' => $this->getLine(), |
| 20 |
]; |
| 21 |
} |
| 22 |
} |
| 23 |
|