ó
:ÏOc           @   sâ   d  Z  d e f d „  ƒ  YZ d e f d „  ƒ  YZ d e f d „  ƒ  YZ d e e f d „  ƒ  YZ 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 d Z d „  Z	 d S(   sŠ   
 This module houses the OGR & SRS Exception objects, and the
 check_err() routine which checks the status code returned by
 OGR methods.
t   GDALExceptionc           B   s   e  Z RS(    (   t   __name__t
   __module__(    (    (    s6   ../Django//lib/python/django/contrib/gis/gdal/error.pyR       s    t   OGRExceptionc           B   s   e  Z RS(    (   R   R   (    (    (    s6   ../Django//lib/python/django/contrib/gis/gdal/error.pyR      s    t   SRSExceptionc           B   s   e  Z RS(    (   R   R   (    (    (    s6   ../Django//lib/python/django/contrib/gis/gdal/error.pyR   	   s    t   OGRIndexErrorc           B   s   e  Z d  Z e Z RS(   s  
    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.
    (   R   R   t   __doc__t   Truet   silent_variable_failure(    (    (    s6   ../Django//lib/python/django/contrib/gis/gdal/error.pyR   
   s   s   Not enough data.i   s   Not enough memory.i   s   Unsupported geometry type.i   s   Unsupported operation.i   s   Corrupt data.i   s   OGR failure.i   s   Unsupported SRS.i   s   Invalid handle.i   i    c         C   sO   |  t  k r d S|  t k r; t |  \ } } | | ƒ ‚ n t d |  ƒ ‚ d S(   sC   Checks the given OGRERR, and raises an exception where appropriate.Ns   Unknown error code: "%s"(   t   OGRERR_NONEt   OGRERR_DICTR   (   t   codet   et   msg(    (    s6   ../Django//lib/python/django/contrib/gis/gdal/error.pyt	   check_err!   s    N(
   R   t	   ExceptionR    R   R   t   KeyErrorR   R
   R	   R   (    (    (    s6   ../Django//lib/python/django/contrib/gis/gdal/error.pyt   <module>   s   