o
    `Zh*                     @   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   T/var/www/html/lang_env/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.)                        Z
AppDefinedZOutOfMemoryFileIOZ
OpenFailedZ
IllegalArgZNotSupportedZAssertionFailedZNoWriteAccessZUserInterruptZ
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   )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>   s2    