
    h\Gg1                     V   d dl mZ d dl mZ d dl mZ d dl mZ  G d de          Ze G d deee                      Z	 G d	 d
e	          Z
e G d de                      Z G d de          Z G d de          Z G d de          Z G d de          Z G d de          ZdS )   )imap)implements_to_string)PY2)	text_typec                   \    e Zd ZdZerddZed             Zd ZdS ddZed             ZdS )	TemplateErrorz"Baseclass for all template errors.Nc                     |"t          |                              d          }t                              | |           d S )Nutf-8)r   encode	Exception__init__selfmessages     _/var/www/html/ws.service.destra.net.br/ws_env/lib/python3.11/site-packages/jinja2/exceptions.pyr   zTemplateError.__init__   s?    "#G,,33G<<tW-----    c                 b    | j         r%| j         d         }||                    dd          S d S d S )N    r
   replace)argsdecoder   s     r   r   zTemplateError.message   sA    y >)A,&">>'9===> >&&r   c                     | j         pdS )N r   r   s    r   __unicode__zTemplateError.__unicode__   s    <&3&r   c                 <    t                               | |           d S N)r   r   r   s     r   r   zTemplateError.__init__   s    tW-----r   c                 :    | j         r| j         d         }||S d S d S )Nr   )r   r   s     r   r   zTemplateError.message!   s2    y #)A,&"N# #&&r   r   )	__name__
__module____qualname____doc__r   r   propertyr   r    r   r   r   r      s        ,,
 #	. 	. 	. 	.
 
	> 	> 
	>	' 	' 	' 	' 	'
	. 	. 	. 	. 
	# 	# 
	# 	# 	#r   r   c                   $    e Zd ZdZdZddZd ZdS )TemplateNotFoundzRaised if a template does not exist.

    .. versionchanged:: 2.11
        If the given name is :class:`Undefined` and no message was
        provided, an :exc:`UndefinedError` is raised.
    Nc                     t                               | |           |,ddlm} t	          ||          r|                                 |}|| _        || _        |g| _        d S )Nr   	Undefined)	IOErrorr   runtimer*   
isinstance_fail_with_undefined_errorr   name	templates)r   r/   r   r*   s       r   r   zTemplateNotFound.__init__6   ss    t$$$?******$	** 2//111G	r   c                     | j         S r   r   r   s    r   __str__zTemplateNotFound.__str__E   s
    |r   r   )r    r!   r"   r#   r   r   r2   r%   r   r   r'   r'   )   sH          G           r   r'   c                       e Zd ZdZddZdS )TemplatesNotFounda  Like :class:`TemplateNotFound` but raised if multiple templates
    are selected.  This is a subclass of :class:`TemplateNotFound`
    exception, so just catching the base exception will catch both.

    .. versionchanged:: 2.11
        If a name in the list of names is :class:`Undefined`, a message
        about it being undefined is shown rather than the empty string.

    .. versionadded:: 2.2
    r%   Nc                 n   |xddl m} g }|D ]B}t          ||          r|                    |j                   -|                    |           Cdd                    t          t          |                    z   }t          	                    | |r|d         pd |           t          |          | _        d S )Nr   r)   z(none of the templates given were found: z, )r,   r*   r-   append_undefined_messagejoinr   r   r'   r   listr0   )r   namesr   r*   partsr/   s         r   r   zTemplatesNotFound.__init__U   s    ?******E ' 'dI.. 'LL!89999LL&&&&AEJJY&&E E G 	!!$(;%)(CtWMMMer   )r%   N)r    r!   r"   r#   r   r%   r   r   r4   r4   I   s2        	 	% % % % % %r   r4   c                   &    e Zd ZdZddZd Zd ZdS )TemplateSyntaxErrorzBRaised to tell the user that there is a problem with the template.Nc                     t                               | |           || _        || _        || _        d | _        d| _        d S )NF)r   r   linenor/   filenamesource
translated)r   r   r@   r/   rA   s        r   r   zTemplateSyntaxError.__init__l   sA    tW---	   r   c                    | j         r| j        S d| j        z  }| j        p| j        }|rd|d|}| j        d|z   g}| j        g	 | j                                        | j        dz
           }n# t          $ r d }Y nw xY w|r*|                    d|	                                z              d
                    |          S )Nzline %dzFile "z", z  r   z    
)rC   r   r@   rA   r/   rB   
splitlines
IndexErrorr7   stripr9   )r   locationr/   lineslines        r   r2   zTemplateSyntaxError.__str__w   s    ? 	 < t{*})	 	: 	:*.$$9Hth/ ;"{--//a@    4Vdjjll2333zz%   s   'A- -A<;A<c                 D    | j         | j        | j        | j        | j        ffS r   )	__class__r   r@   r/   rA   r   s    r   
__reduce__zTemplateSyntaxError.__reduce__   s"    
 ~dk49dmTTTr   )NN)r    r!   r"   r#   r   r2   rN   r%   r   r   r>   r>   h   sQ        LL	  	  	  	 ! ! !.U U U U Ur   r>   c                       e Zd ZdZdS )TemplateAssertionErrora  Like a template syntax error, but covers cases where something in the
    template caused an error at compile time that wasn't necessarily caused
    by a syntax error.  However it's a direct subclass of
    :exc:`TemplateSyntaxError` and has the same attributes.
    Nr    r!   r"   r#   r%   r   r   rP   rP      s           r   rP   c                       e Zd ZdZdS )TemplateRuntimeErrorzoA generic runtime error in the template engine.  Under some situations
    Jinja may raise this exception.
    NrQ   r%   r   r   rS   rS                 r   rS   c                       e Zd ZdZdS )UndefinedErrorz<Raised if a template tries to operate on :class:`Undefined`.NrQ   r%   r   r   rV   rV      s        FFFFr   rV   c                       e Zd ZdZdS )SecurityErrorzWRaised if a template tries to do something insecure if the
    sandbox is enabled.
    NrQ   r%   r   r   rX   rX      rT   r   rX   c                       e Zd ZdZdS )FilterArgumentErrorzQThis error is raised if a filter was called with inappropriate
    arguments
    NrQ   r%   r   r   rZ   rZ      rT   r   rZ   N)_compatr   r   r   r   r   r   r+   LookupErrorr'   r4   r>   rP   rS   rV   rX   rZ   r%   r   r   <module>r]      s         ) ) ) ) ) )            # # # # #I # # #B     w]   >% % % % %( % % %> *U *U *U *U *U- *U *U *UZ    0       =   G G G G G) G G G    (       .     r   