
vÅÏ^(  ã               @   s/  d  Z  Gd d „  d e ƒ Z Gd d „  d e ƒ Z d e d f d e d f d	 e d
 f d e d f d e d f d e d f d e d f d e d f i Z d e d f d e d f d	 e d f d e d f d e d f d e d f d e d f d e d f d e d f d e d  f i
 Z d! Z d" d# d$ „ Z d% S)&z
 This module houses the GDAL & SRS Exception objects, and the
 check_err() routine which checks the status code returned by
 GDAL/OGR methods.
c               @   s   e  Z d  Z d S)ÚGDALExceptionN)Ú__name__Ú
__module__Ú__qualname__© r   r   ú?/tmp/pip-build-8lau8j11/django/django/contrib/gis/gdal/error.pyr   	   s   r   c               @   s   e  Z d  Z d S)ÚSRSExceptionN)r   r   r   r   r   r   r   r      s   r   é   zNot enough data.é   zNot enough memory.é   zUnsupported geometry type.é   zUnsupported operation.é   zCorrupt data.é   zOGR failure.é   zUnsupported SRS.é   zInvalid handle.Z
AppDefinedZOutOfMemoryÚFileIOZ
OpenFailedZ
IllegalArgZNotSupportedZAssertionFailedZNoWriteAccessé	   ZUserInterrupté
   Z
ObjectNullé    Fc             C   sa   | r t  n t } |  t k r" d S|  | k rM | |  \ } } | | ƒ ‚ n t d |  ƒ ‚ d S)zN
    Check the given CPL/OGRERR and raise an exception where appropriate.
    NzUnknown error code: "%s")ÚCPLERR_DICTÚOGRERR_DICTÚERR_NONEr   )ÚcodeZcplZerr_dictÚeÚmsgr   r   r   Ú	check_err1   s    r   N)Ú__doc__Ú	Exceptionr   r   r   r   r   r   r   r   r   r   Ú<module>   s,   