Closed amirkoklan closed 8 years ago
I am not sure I understand the question. We throw a specific exception that can be caught when the IP is not in the database. This seems more meaningful than a false value when you are expecting an object back. You can always use MaxMind\Db\Reader
directly if you want different behvior.
I'm just wondering why don't we return something more meaningful like a "FALSE" or "Error=>true" when an IP is not in the DB. (your webservice was doing the later one)
Like that on the other hand we can handle it better. here: https://github.com/maxmind/GeoIP2-php/blob/master/src/Database/Reader.php#L221