Skip to content

Commit c44229d

Browse files
committed
chore: updated error handling documentation
1 parent 9b4b5ec commit c44229d

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

docs/04-error-handling.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -73,19 +73,18 @@ catch (ApiErrorException $exception) {
7373

7474
## Validation Errors
7575

76-
To catch invalid input data (like an out of range coordinate, blank location name, etc.),
77-
the `ValidationException` is available:
76+
To catch invalid input data (like an out of range coordinate, blank location name, etc.), the `ValidationException` is available:
7877

7978
```php
80-
use ProgrammatorDev\OpenWeatherMap\Exception\ValidationException;
79+
use ProgrammatorDev\YetAnotherPhpValidator\Exception\ValidationException;
8180

8281
try {
8382
// An invalid latitude value is given
8483
$weather = $openWeatherMap->getWeather()->getCurrent(999, 50);
8584
}
8685
catch (ValidationException $exception) {
8786
// Should print:
88-
// The "latitude" value "999" is invalid. Must be between "-90" and "90".
87+
// The "latitude" value should be between "-90" and "90", "999" given.
8988
echo $exception->getMessage();
9089
}
9190
```

0 commit comments

Comments
 (0)