o
    uvXj(  ã                   @   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                   @   ó   e Zd ZdS )ÚGDALExceptionN©Ú__name__Ú
__module__Ú__qualname__© r   r   úZ/var/www/html/myproject/venv/lib/python3.10/site-packages/django/contrib/gis/gdal/error.pyr   	   ó    r   c                   @   r   )ÚSRSExceptionNr   r   r   r   r   r
      r	   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.)é   é   é   é   é   é   é   é   Ú
AppDefinedÚOutOfMemoryÚFileIOÚ
OpenFailedÚ
IllegalArgÚNotSupportedÚAssertionFailedÚNoWriteAccessÚUserInterruptÚ
ObjectNull)
r   r   r   r   r   r   r   r   é	   é
   é    Fc                 C   s@   |rt nt}| tkrdS | |v r||  \}}||ƒ‚td|  ƒ‚)zN
    Check the given CPL/OGRERR and raise an exception where appropriate.
    NzUnknown error code: "%s")ÚCPLERR_DICTÚOGRERR_DICTÚERR_NONEr   )ÚcodeÚcplÚerr_dictÚeÚmsgr   r   r   Ú	check_err1   s   r(   N)F)Ú__doc__Ú	Exceptionr   r
   r!   r    r"   r(   r   r   r   r   Ú<module>   s2    øö