Skip to content

Commit 56b10a1

Browse files
committed
Change the type of Exception thrown when no Identifier provided
1 parent 5f3a2eb commit 56b10a1

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

app/code/Magento/Cms/Block/BlockByIdentifier.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -111,9 +111,7 @@ private function filterOutput(string $content): string
111111
private function getCmsBlock(): BlockInterface
112112
{
113113
if (!$this->getIdentifier()) {
114-
throw new NoSuchEntityException(
115-
__('Expected value of `identifier` was not provided')
116-
);
114+
throw new \InvalidArgumentException('Expected value of `identifier` was not provided');
117115
}
118116

119117
if (null === $this->cmsBlock) {

0 commit comments

Comments
 (0)