-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Throw error if disk cannot be accessed (#3067)
* test error is thrown and no records in db * Create DiskCannotBeAccessed.php * add transcation * fix ci test * Update DiskCannotBeAccessed.php * remove database transactions * minor test updates as requested Co-authored-by: Freek Van der Herten <freek@spatie.be> Co-authored-by: Patrick Organ <patinthehat@users.noreply.github.com>
- Loading branch information
1 parent
c7af276
commit 4acff99
Showing
4 changed files
with
66 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<?php | ||
|
||
namespace Spatie\MediaLibrary\MediaCollections\Exceptions; | ||
|
||
class DiskCannotBeAccessed extends FileCannotBeAdded | ||
{ | ||
public static function create(string $diskName): self | ||
{ | ||
return new static("Disk named `{$diskName}` cannot be accessed"); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters