Skip to content

Commit

Permalink
Add documentation about the brand new WrongIpException
Browse files Browse the repository at this point in the history
  • Loading branch information
Davide Pastore committed Sep 10, 2020
1 parent 48cd6e5 commit 3b63dae
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,20 @@ try {
}
```

#### Wrong Ip Exception

It could happen that your API call is trying to obtain info about a wrong ip. You can handle it by catching the `WrongIpException`:

```php
use DavidePastore\Ipinfo\Exception\WrongIpException;

try {
$host = $ipInfo->getFullIpDetails("qwerty");
} catch (WrongIpException $e) {
echo 'Caught exception: ', $e->getMessage(), "\n";
}
```

Issues
-------

Expand Down

0 comments on commit 3b63dae

Please sign in to comment.