PluginProbe
ووسلام – همگام سازی ووکامرس و باسلام / 1.10.18
ووسلام – همگام سازی ووکامرس و باسلام v1.10.18
1.10.18 1.10.17 1.10.15 1.10.14 1.10.13 1.10.12 1.10.10 1.10.9 1.10.8 1.10.7 1.10.6 1.10.5 1.10.4 1.10.3 1.10.2 1.10.1 1.10.0 1.9.2 1.9.1 1.9.0 1.8.8 1.8.5 1.8.6 1.8.7 1.8.4 All 51 releases
sync-basalam / includes / Jobs / Exceptions / JobException.php

JobException.php in ووسلام – همگام سازی ووکامرس و باسلام 1.10.18, at includes/Jobs/Exceptions/JobException.php

37 lines 819 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
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 /** @var array|null Raw (decoded) API response body attached to this error, when available. */
12 protected $responseData = null;
13
14 abstract public function shouldRetry(): bool;
15
16 public function setResponseData(?array $responseData): self
17 {
18 $this->responseData = $responseData;
19 return $this;
20 }
21
22 public function getResponseData(): ?array
23 {
24 return $this->responseData;
25 }
26
27 public function getErrorContext(): array
28 {
29 return [
30 'message' => $this->getMessage(),
31 'code' => $this->getCode(),
32 'file' => $this->getFile(),
33 'line' => $this->getLine(),
34 ];
35 }
36 }
37