Primo Committ
This commit is contained in:
13
vendor/spatie/laravel-backup/src/Exceptions/CannotCreateDbDumper.php
vendored
Normal file
13
vendor/spatie/laravel-backup/src/Exceptions/CannotCreateDbDumper.php
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
<?php
|
||||
|
||||
namespace Spatie\Backup\Exceptions;
|
||||
|
||||
use Exception;
|
||||
|
||||
class CannotCreateDbDumper extends Exception
|
||||
{
|
||||
public static function unsupportedDriver(string $driver): self
|
||||
{
|
||||
return new static("Cannot create a dumper for db driver `{$driver}`. Use `mysql`, `pgsql`, `mongodb` or `sqlite`.");
|
||||
}
|
||||
}
|
||||
23
vendor/spatie/laravel-backup/src/Exceptions/InvalidBackupDestination.php
vendored
Normal file
23
vendor/spatie/laravel-backup/src/Exceptions/InvalidBackupDestination.php
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
namespace Spatie\Backup\Exceptions;
|
||||
|
||||
use Exception;
|
||||
|
||||
class InvalidBackupDestination extends Exception
|
||||
{
|
||||
public static function diskNotSet(string $backupName): self
|
||||
{
|
||||
return new static("There is no disk set for the backup named `{$backupName}`.");
|
||||
}
|
||||
|
||||
public static function connectionError(string $diskName): self
|
||||
{
|
||||
return new static ("There is a connection error when trying to connect to disk named `{$diskName}`");
|
||||
}
|
||||
|
||||
public static function writeError(string $diskName): self
|
||||
{
|
||||
return new static ("There was an error trying to write to disk named `{$diskName}`");
|
||||
}
|
||||
}
|
||||
23
vendor/spatie/laravel-backup/src/Exceptions/InvalidBackupJob.php
vendored
Normal file
23
vendor/spatie/laravel-backup/src/Exceptions/InvalidBackupJob.php
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
namespace Spatie\Backup\Exceptions;
|
||||
|
||||
use Exception;
|
||||
|
||||
class InvalidBackupJob extends Exception
|
||||
{
|
||||
public static function noDestinationsSpecified(): self
|
||||
{
|
||||
return new static('A backup job cannot run without a destination to backup to!');
|
||||
}
|
||||
|
||||
public static function destinationDoesNotExist(string $diskName): self
|
||||
{
|
||||
return new static("There is no backup destination with a disk named `{$diskName}`.");
|
||||
}
|
||||
|
||||
public static function noFilesToBeBackedUp(): self
|
||||
{
|
||||
return new static('There are no files to be backed up.');
|
||||
}
|
||||
}
|
||||
13
vendor/spatie/laravel-backup/src/Exceptions/InvalidCommand.php
vendored
Normal file
13
vendor/spatie/laravel-backup/src/Exceptions/InvalidCommand.php
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
<?php
|
||||
|
||||
namespace Spatie\Backup\Exceptions;
|
||||
|
||||
use Exception;
|
||||
|
||||
class InvalidCommand extends Exception
|
||||
{
|
||||
public static function create(string $reason): self
|
||||
{
|
||||
return new static($reason);
|
||||
}
|
||||
}
|
||||
13
vendor/spatie/laravel-backup/src/Exceptions/InvalidConfiguration.php
vendored
Normal file
13
vendor/spatie/laravel-backup/src/Exceptions/InvalidConfiguration.php
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
<?php
|
||||
|
||||
namespace Spatie\Backup\Exceptions;
|
||||
|
||||
use Exception;
|
||||
|
||||
class InvalidConfiguration extends Exception
|
||||
{
|
||||
public static function cannotUseUnsupportedDriver(string $connectionName, string $driverName): self
|
||||
{
|
||||
return new static("Db connection `{$connectionName}` uses an unsupported driver `{$driverName}`. Only `mysql` and `pgsql` are supported.");
|
||||
}
|
||||
}
|
||||
13
vendor/spatie/laravel-backup/src/Exceptions/InvalidHealthCheck.php
vendored
Normal file
13
vendor/spatie/laravel-backup/src/Exceptions/InvalidHealthCheck.php
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
<?php
|
||||
|
||||
namespace Spatie\Backup\Exceptions;
|
||||
|
||||
use Exception;
|
||||
|
||||
class InvalidHealthCheck extends Exception
|
||||
{
|
||||
public static function because(string $message): self
|
||||
{
|
||||
return new static($message);
|
||||
}
|
||||
}
|
||||
15
vendor/spatie/laravel-backup/src/Exceptions/NotificationCouldNotBeSent.php
vendored
Normal file
15
vendor/spatie/laravel-backup/src/Exceptions/NotificationCouldNotBeSent.php
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
<?php
|
||||
|
||||
namespace Spatie\Backup\Exceptions;
|
||||
|
||||
use Exception;
|
||||
|
||||
class NotificationCouldNotBeSent extends Exception
|
||||
{
|
||||
public static function noNotificationClassForEvent($event): self
|
||||
{
|
||||
$eventClass = get_class($event);
|
||||
|
||||
return new static("There is no notification class that can handle event `{$eventClass}`.");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user