§
    P„j(  ã                   ó>   — d Z ddlZd„ Zd„ Zej        d„ ¦   «         ZdS )z+Some generic utility functions used by Gin.é    Nc                 óð   ‡ ‡—  G ˆ ˆfd„dt          ‰ ¦  «        ¦  «        }t          ‰ ¦  «        j        |_         |¦   «         }t          ‰ ¦  «        j        |_        |                     ‰ j        ¦  «        d‚)zGReraises `exception`, appending `message` to its string representation.c                   óP   •— e Zd ZdZ e” ¦  «        j        Zd„ Zˆ fd„Zˆ ˆfd„ZdS )ú=augment_exception_message_and_reraise.<locals>.ExceptionProxyz;Acts as a proxy for an exception with an augmented message.c                 ó   — d S ©N© )Úselfs    úN/root/disk_3tb/conda_envs/Huy-visual/lib/python3.11/site-packages/gin/utils.pyÚ__init__zFaugment_exception_message_and_reraise.<locals>.ExceptionProxy.__init__   s   € Ø
€dó    c                 ó$   •— t          ‰|¦  «        S r   )Úgetattr)r	   Ú	attr_nameÚ	exceptions     €r
   Ú__getattr__zIaugment_exception_message_and_reraise.<locals>.ExceptionProxy.__getattr__   s   ø€ Ý�Y 	Ñ*Ô*Ð*r   c                 ó(   •— t          ‰¦  «        ‰z   S r   )Ústr)r	   r   Úmessages    €€r
   Ú__str__zEaugment_exception_message_and_reraise.<locals>.ExceptionProxy.__str__"   s   ø€ Ý�‰^Œ^˜gÑ%Ð%r   N)Ú__name__Ú
__module__Ú__qualname__Ú__doc__Útyper   r   r   )r   r   s   €€r
   ÚExceptionProxyr      sq   ø€ € € € € ØEÐEØ��i‘”Ô+€Jðð ð ð+ð +ð +ð +ð +ð&ð &ð &ð &ð &ð &ð &ð &r   r   N)r   r   r   Úwith_tracebackÚ__traceback__)r   r   r   Úproxys   ``  r
   Ú%augment_exception_message_and_reraiser      s�   øø€ ð&ð &ð &ð &ð &ð &ð &ð &•t˜I‘”ñ &ô &ð &õ ! ™OœOÔ4€.Ôà
ˆ.Ñ
Ô
€%Ý $ Y¡¤Ô <€.ÔØ×Ò˜YÔ4Ñ5Ô5¸4Ð?r   c                 óØ   — | \  }}}}|rd                      |¦  «        nd}d                      |||                     ¦   «         ¬¦  «        }|rd                      d|z  ¦  «        nd}||z   S )Nz
file "{}",zbindings stringz+
  In {filename} line {line_num}
    {line})ÚfilenameÚline_numÚlinez
    {}^ú Ú )ÚformatÚrstrip)Úlocationr!   r"   Úchar_numr#   Ú	line_infoÚ	char_infos          r
   Ú_format_locationr,   ,   s†   € Ø'/Ñ$€(ˆH�h Ø.6ÐMˆ\× Ò  Ñ*Ô*Ð*Ð<M€(Ø=×DÒDØ (°·²±´ð Eñ @ô @€)à4<ÐDˆk× Ò   x¡Ñ0Ô0Ð0À"€)Ø	�YÑ	Ðr   c              #   óª   K  — 	 d V — d S # t           $ r>}t          |t          ¦  «        r‚ t          |t	          | ¦  «        ¦  «         Y d }~d S d }~ww xY wr   )Ú	ExceptionÚ
isinstanceÚSyntaxErrorr   r,   )r(   r   s     r
   Útry_with_locationr1   5   s|   è è € ðQØ	€E€E€E€E€EøÝ	ð Qð Qð QÝ�)�[Ñ)Ô)ð ØÝ)¨)Õ5EÀhÑ5OÔ5OÑPÔPÐPÐPÐPÐPÐPÐPÐPøøøøðQøøøs   „
 Š
A”3AÁA)r   Ú
contextlibr   r,   Úcontextmanagerr1   r   r   r
   ú<module>r4      sh   ðð  2Ð 1à Ð Ð Ð ð@ð @ð @ð.ð ð ð ÔðQð Qñ ÔðQð Qð Qr   