26 lines
605 B
PHP
26 lines
605 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace App\Exceptions;
|
|
|
|
use RuntimeException;
|
|
|
|
class BackupOperationException extends RuntimeException
|
|
{
|
|
public static function missingBinary(string $binary): self
|
|
{
|
|
return new self("Required binary '{$binary}' is not installed on the server.");
|
|
}
|
|
|
|
public static function diskNotConfigured(string $disk): self
|
|
{
|
|
return new self("Backup disk '{$disk}' is not configured or unreachable.");
|
|
}
|
|
|
|
public static function restoreFailed(string $reason): self
|
|
{
|
|
return new self("Backup restore failed: {$reason}");
|
|
}
|
|
}
|