We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 693636e commit 178ac8aCopy full SHA for 178ac8a
1 file changed
README.md
@@ -458,16 +458,18 @@ $fruits = Block::make($fruitsArray)
458
->throwOnMissingKey();
459
460
$nothing = $fruits->get("a-missing-key"); // throws exception
461
+```
462
463
+You can also pass your own exception class (must extend `\Throwable`).
464
465
+```php
466
$fruits->throwOnMissingKey(
467
MyMissingKeyException::class,
- "The key in the configuration JSON file doens't exist?"
468
+ "The key in the JSON configuration file does not exist?"
469
);
470
+$nothing = $fruits->get("a-missing-key"); // throws your custom exception
471
```
472
-You can also pass your own exception class (must extend `\Throwable`).
-
473
#### Summary for the "missing key behavior"
474
475
| Mode | Result |
0 commit comments