ContainerException.php
3 months ago
FailedToSaveListScreen.php
3 months ago
HookTimingException.php
3 months ago
InvalidTableScreenException.php
3 months ago
RequestException.php
3 months ago
ValueNotFoundException.php
3 months ago
ValueNotFoundException.php
21 lines
| 1 | <?php |
| 2 | |
| 3 | declare(strict_types=1); |
| 4 | |
| 5 | namespace AC\Exception; |
| 6 | |
| 7 | use RuntimeException; |
| 8 | |
| 9 | final class ValueNotFoundException extends RuntimeException |
| 10 | { |
| 11 | |
| 12 | public static function from_id($id): self |
| 13 | { |
| 14 | $message = is_scalar($id) |
| 15 | ? sprintf('Value for id %s was not found.', $id) |
| 16 | : 'Value was not found.'; |
| 17 | |
| 18 | return new self($message); |
| 19 | } |
| 20 | |
| 21 | } |