U
    8ÄT_(  ã                   @   s®   d Z G dd„ deƒZG dd„ deƒZedfedfedfedfed	fed
fedfedfdœZedfedfedfedfedfedfedfedfedfedfdœ
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   úA/tmp/pip-unpacked-wheel-dv63caxw/django/contrib/gis/gdal/error.pyr   	   s   r   c                   @   s   e Zd ZdS )ÚSRSExceptionNr   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NoWriteAccessZUserInterruptZ
ObjectNull)
r	   r
   r   r   r   r   r   r   é	   é
   é    Fc                 C   sF   |rt nt}| tkrdS | |kr6||  \}}||ƒ‚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)F)Ú__doc__Ú	Exceptionr   r   r   r   r   r   r   r   r   r   Ú<module>   s0   øö