
    i                     t    d dl Z d dlZd dlmZmZ d dlmZ d dlmZ erd dlm	Z	 d dlm
Z
  G d de      Zd	 Zy)
    N)capture_internal_exceptionsevent_from_exception)Integration)TYPE_CHECKING)Callable)Anyc                        e Zd ZdZed        Zy)UnraisablehookIntegrationunraisablehookc                  H    t        t        j                        t        _        y )N)_make_unraisablesysr        /var/www/html/hwPaymentPortal-be-dev/hw-payment-portal-api/venv/lib/python3.12/site-packages/sentry_sdk/integrations/unraisablehook.py
setup_oncez$UnraisablehookIntegration.setup_once   s     .c.@.@Ar   N)__name__
__module____qualname__
identifierstaticmethodr   r   r   r   r
   r
      s    !JB Br   r
   c                       fd}|S )Nc                    t        j                         j                  t              }| |       S | j                  r| j
                  r{t               5  t        | j                  | j                  | j
                  ft        j                         j                  ddd      \  }}t        j                  ||       d d d         |       S # 1 sw Y   xY w)Nr   F)typehandled)client_options	mechanism)hint)
sentry_sdk
get_clientget_integrationr
   	exc_valueexc_tracebackr   r   exc_typeoptionscapture_event)
unraisableintegrationeventr   old_unraisablehooks       r   sentry_sdk_unraisablehookz3_make_unraisable.<locals>.sentry_sdk_unraisablehook   s     ++-==>WX
 %j11J$<$<,. 
;2"++",,"00
 $.#8#8#:#B#B'7EJt ((T:
; "*--
; 
;s   A)CCr   )r*   r+   s   ` r   r   r      s    .2 %$r   )r   r   sentry_sdk.utilsr   r   sentry_sdk.integrationsr   typingr   r   r   r
   r   r   r   r   <module>r/      s4    
  0  B B%r   