summaryrefslogtreecommitdiff
path: root/cffi/error.py
Commit message (Collapse)AuthorAgeFilesLines
* Tweaks to the pkgconfig supportArmin Rigo2019-01-311-6/+7
|
* Reduce number of exceptionsMichal Vyskocil2019-01-111-9/+4
|
* Define and raise specific hierarchy of exceptionsMichal Vyskocil2019-01-101-0/+12
| | | | | | | | | | | | | | | | | | | | | | | * PkgConfigNotFound - not installed * PkgConfigError - base pkg-config errors * PkgConfigModuleNotFound - pc file for module was not found * PkgConfigModuleVersionNotFound - requested version was not found Boilerplate now looks ``` from cffi.error import PkgConfigNotFound, PkgConfigError ... try: # try pkg-config way ffibuilder.set_source(..., pkgconfig=["libczmq >= 4.0.0"]) except PkgConfigNotFound as e: # if pkg-config is not installed, try backup ffibuilder.set_source(..., libraries=["czmq", "zmq", "uuid", "pgm"]) except PkgConfigError as e: # here we catch both PkgConfigModuleNotFound and PkgConfigModuleVersionNotFound # and raise it again - simply to show they are raised raise e from None ```
* Try to systematically include the line numberArmin Rigo2017-05-091-3/+6
|
* Avoid cyclic imports by moving exceptions to a separate moduleRonan Lamy2017-01-201-0/+20