
 X                 @   s`  d  Z  Gd d   d e  Z e Z Gd d   d e  Z Gd d   d e e  Z i e d f d 6e d	 f d
 6e d f d 6e d f d 6e d f d 6e d f d 6e d f d 6e d f d 6Z i
 e d f d 6e d f d
 6e d f d 6e d f d 6e d f d 6e d f d 6e d f d 6e d f d 6e d f d  6e d! f d" 6Z 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   K/home/ubuntu/projects/ifolica/build/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   c               @   s   e  Z d  Z d Z d Z d S)OGRIndexErrora  
    This exception is raised when an invalid index is encountered, and has
    the 'silent_variable_feature' attribute set to true.  This ensures that
    django's templates proceed to use the next lookup type gracefully when
    an Exception is raised.  Fixes ticket #4740.
    TN)r   r   r   __doc__Zsilent_variable_failurer   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UserInterrupt	   Z
ObjectNull
       Fc             C   sa   | r t  n t } |  t k r" d S|  | k rM | |  \ } } | |   n t d |    d S)zQ
    Checks the given CPL/OGRERR, and raises an exception where appropriate.
    NzUnknown error code: "%s")CPLERR_DICTOGRERR_DICTERR_NONEr   )codeZcplZerr_dictemsgr   r   r   	check_err>   s    r   N)r	   	Exceptionr   ZOGRExceptionr   KeyErrorr   r   r   r   r   r   r   r   r   <module>   s4   