"""Exceptions for pyproj"""frompyproj._contextimport_clear_proj_error,_get_proj_error
[docs]classProjError(RuntimeError):"""Raised when a Proj error occurs."""def__init__(self,error_message:str)->None:proj_error=_get_proj_error()ifproj_errorisnotNone:error_message=f"{error_message}: (Internal Proj Error: {proj_error})"_clear_proj_error()super().__init__(error_message)
[docs]classCRSError(ProjError):"""Raised when a CRS error occurs."""
[docs]classGeodError(RuntimeError):"""Raised when a Geod error occurs."""
[docs]classDataDirError(RuntimeError):"""Raised when a the data directory was not found."""