#35681: GeoIP2Exception does not work as advertised
------------------------------+------------------------------------
Reporter: Jon Ribbens | Owner: (none)
Type: Bug | Status: new
Component: GIS | Version: 5.1
Severity: Normal | Resolution:
Keywords: geoip geoip2 | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
------------------------------+------------------------------------
Comment (by Jon Ribbens):
As I mentioned, simply tweaking the docs wouldn't solve the problem that
there is no way to catch exceptions from the underlying library without
either (a) breaking the encapsulation or (b) catching the overly-broad
`Exception`, which is generally regarded as bad practice.
Shall I make a patch then updating the docs and providing an alias for
`geoip2.errors.GeoIP2Error` as
`contrib.gis.geoip2.GeoIP2UnderlyingException` (or possibly two separate
ones, one for `AddressNotFoundError` and one for everything else)?
--
Ticket URL: <https://code.djangoproject.com/ticket/35681#comment:4>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/01070191554bbf1e-4a296345-64c6-460a-af1f-7c317bca47dc-000000%40eu-central-1.amazonses.com.