-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Throw internal exception while fetching not decoded identifier from c…
…ollection
- Loading branch information
Krzysztof Grabania
committed
Nov 2, 2020
1 parent
3e89abe
commit 81fc55b
Showing
2 changed files
with
41 additions
and
3 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,38 @@ | ||
<?php | ||
declare(strict_types=1); | ||
|
||
namespace NGT\Barcode\GS1Decoder\Exceptions; | ||
|
||
use InvalidArgumentException; | ||
|
||
class MissingIdentifier extends InvalidArgumentException | ||
{ | ||
/** | ||
* The missing identifier code. | ||
* | ||
* @var string | ||
*/ | ||
protected $identifierCode; | ||
|
||
/** | ||
* The exception constructor. | ||
* | ||
* @param string $identifierCode | ||
*/ | ||
public function __construct(string $identifierCode) | ||
{ | ||
parent::__construct("Missing identifier with \"{$identifierCode}\" code."); | ||
|
||
$this->identifierCode = $identifierCode; | ||
} | ||
|
||
/** | ||
* Get the missing identifier code. | ||
* | ||
* @return string | ||
*/ | ||
public function getIdentifierCode(): string | ||
{ | ||
return $this->identifierCode; | ||
} | ||
} |
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