BackupRuntimeException.php
3 years ago
DiskNotWritableException.php
3 years ago
ProcessLockedException.php
3 years ago
StorageException.php
3 years ago
TaskHealthException.php
3 years ago
ThresholdException.php
3 years ago
TaskHealthException.php
21 lines
| 1 | <?php |
| 2 | |
| 3 | namespace WPStaging\Backup\Exceptions; |
| 4 | |
| 5 | use WPStaging\Framework\Exceptions\WPStagingException; |
| 6 | |
| 7 | class TaskHealthException extends WPStagingException |
| 8 | { |
| 9 | const CODE_TASK_FAILED_TOO_MANY_TIMES = 200; |
| 10 | |
| 11 | public static function retryingTask($retries, $maxRetries) |
| 12 | { |
| 13 | return new self(sprintf(__('PHP failed to process this task. We will lower the memory usage and try again... (%d/%d)', 'wp-staging'), $retries, $maxRetries), 100); |
| 14 | } |
| 15 | |
| 16 | public static function taskFailedTooManyTimes() |
| 17 | { |
| 18 | return new self(__('Sorry, a task failed too many times and the process cannot proceed.', 'wp-staging'), self::CODE_TASK_FAILED_TOO_MANY_TIMES); |
| 19 | } |
| 20 | } |
| 21 |