
    shU                     h    S r SSKJrJrJr  SSKJr  \S 5       r\S 5       r\S 5       r	\S 5       r
g)	z 
Exception handling intrinsics.
    )typeserrorscgutils)	intrinsicc                 :    S n[         R                  nU" 5       U4$ )z4An intrinsic to check if an exception is raised
    c                 <    U R                   nUR                  U5      $ N)nrteh_checkcontextbuilder	signatureargsr
   s        h/Users/tiagomarins/Projetos/claudeai/copy_bank/venv/lib/python3.13/site-packages/numba/core/unsafe/eh.pycodegen exception_check.<locals>.codegen   s    kk||G$$    )r   boolean	typingctxr   restypes      r   exception_checkr   	   s    % mmG9gr   c                 :    S n[         R                  nU" 5       U4$ )z5An intrinsic to mark the start of a *try* block.
    c                 \    U R                   nUR                  U5        U R                  5       $ r	   )r
   eh_tryget_dummy_valuer   s        r   r   mark_try_block.<locals>.codegen   s&    kk

7&&((r   r   noner   s      r   mark_try_blockr!          )
 jjG9gr   c                 :    S n[         R                  nU" 5       U4$ )z3An intrinsic to mark the end of a *try* block.
    c                 \    U R                   nUR                  U5        U R                  5       $ r	   )r
   
eh_end_tryr   r   s        r   r   end_try_block.<locals>.codegen&   s&    kkw&&((r   r   r   s      r   end_try_blockr'   "   r"   r   c                     UR                   [        La+  Sn[        R                  " UR	                  [        5      5      eS n[
        R                  nU" X5      U4$ )zoBasically do ``isinstance(exc_value, exc_class)`` for exception objects.
Used in ``except Exception:`` syntax.
z#Exception matching is limited to {}c                 "    [         R                  $ r	   )r   true_bit)r   r   r   r   s       r   r    exception_match.<locals>.codegen9   s    r   )	exc_class	Exceptionr   UnsupportedErrorformatr   r   )r   	exc_valuer,   msgr   r   s         r   exception_matchr2   /   sQ     )+3%%cjj&;<<  mmG9('11r   N)__doc__
numba.corer   r   r   numba.core.extendingr   r   r!   r'   r2    r   r   <module>r7      se    . - *   	 	 	 	 2 2r   