Skip to content

Commit

Permalink
Rename exception
Browse files Browse the repository at this point in the history
  • Loading branch information
duncanmcclean committed Jul 8, 2021
1 parent 1103d78 commit dd72ea2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
use Statamic\Facades\Blueprint;
use Statamic\Statamic;

class BlueprintDoesNotExistException extends Exception implements ProvidesSolution
class BlueprintNotFoundException extends Exception implements ProvidesSolution
{
protected $blueprintHandle;

Expand Down
4 changes: 2 additions & 2 deletions src/Http/Controllers/CP/Collections/EntriesController.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
use Illuminate\Validation\ValidationException;
use Statamic\Contracts\Entries\Entry as EntryContract;
use Statamic\CP\Breadcrumbs;
use Statamic\Exceptions\BlueprintDoesNotExistException;
use Statamic\Exceptions\BlueprintNotFoundException;
use Statamic\Facades\Asset;
use Statamic\Facades\Entry;
use Statamic\Facades\Site;
Expand Down Expand Up @@ -78,7 +78,7 @@ public function edit(Request $request, $collection, $entry)
$blueprint = $entry->blueprint();

if (! $blueprint) {
throw new BlueprintDoesNotExistException($entry->get('blueprint'));
throw new BlueprintNotFoundException($entry->get('blueprint'));
}

if (User::current()->cant('edit-other-authors-entries', [EntryContract::class, $collection, $blueprint])) {
Expand Down

0 comments on commit dd72ea2

Please sign in to comment.