azavea / python-omgeo

OMGeocoder - A python geocoding abstraction layer
http://python-omgeo.readthedocs.io/en/latest/
MIT License
36 stars 14 forks source link

Define and use a base Exception class for the package #49

Open KlaasH opened 6 years ago

KlaasH commented 6 years ago

There are several places where this raises a custom exception with raise Exception(...), e.g. https://github.com/azavea/python-omgeo/blob/8308301edf3921b97dd977f8b54b3201a29b3868/omgeo/services/esri.py#L91.

Making users of the package catch Exception is not very nice. Even if we don't need subtypes, we should define a base Exception class for the package so that people can make their exception handling more specific.