Ë
    l¨¸h½	  ã                   ó€   — d dl Z 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mZ  G d„ de«      Zd	„ Zy)
é    N)Úcapture_internal_exceptionsÚevent_from_exception)ÚIntegration)ÚTYPE_CHECKING)ÚCallable)ÚNoReturnÚUnionc                   ó@   — e Zd ZdZdZddœd„Zed„ «       Zed„ «       Zy)	ÚSysExitIntegrationaM  Captures sys.exit calls and sends them as events to Sentry.

    By default, SystemExit exceptions are not captured by the SDK. Enabling this integration will capture SystemExit
    exceptions generated by sys.exit calls and send them to Sentry.

    This integration, in its default configuration, only captures the sys.exit call if the exit code is a non-zero and
    non-None value (unsuccessful exits). Pass `capture_successful_exits=True` to capture successful exits as well.
    Note that the integration does not capture SystemExit exceptions raised outside a call to sys.exit.
    Úsys_exitF)Úcapture_successful_exitsc                ó   — || _         y ©N)Ú_capture_successful_exits)Úselfr   s     úr/var/www/pru.catia.catastroantioquia-mas.com/tasa/lib/python3.12/site-packages/sentry_sdk/integrations/sys_exit.pyÚ__init__zSysExitIntegration.__init__   s
   € à)AˆÕ&ó    c                  ó,   — t         j                  «        y r   )r   Ú_patch_sys_exit© r   r   Ú
setup_oncezSysExitIntegration.setup_once   s   € ô 	×*Ñ*Õ,r   c                  óx   ‡— t         j                  Št        j                  ‰«      dˆfd„	«       } | t         _        y )Nc                 ó  •— t        j                  «       j                  t        «      }|€ ‰| «       	  ‰| «       y # t        $ rB}t        «       5  |j                  s| dvrt        |«       d d d «       |‚# 1 sw Y   |‚xY wd }~ww xY w)N)r   N)Ú
sentry_sdkÚ
get_clientÚget_integrationr   Ú
SystemExitr   r   Ú_capture_exception)Ú_SysExitIntegration__statusÚintegrationÚeÚold_exits      €r   Úsentry_patched_exitz?SysExitIntegration._patch_sys_exit.<locals>.sentry_patched_exit)   sŽ   ø€ ô %×/Ñ/Ó1×AÑAÔBTÓUˆKØÐ"Ù˜Ô"ð	Ù˜Õ"øÜò Ü0Ó2ñ .Ø"×<Ò<Àð Qñ Aô +¨1Ô-÷.ð ÷.ð þðús-   ´= ½	BÁ
BÁA6Á,
BÁ6B 	Á;BÂB)r   )ÚsysÚexitÚ	functoolsÚwraps)r$   r#   s    @r   r   z"SysExitIntegration._patch_sys_exit$   s2   ø€ ô —8‘8ˆä	‰˜Ó	"ô	ó 
#ð	ð$ 'Œr   N)	Ú__name__Ú
__module__Ú__qualname__Ú__doc__Ú
identifierr   Ústaticmethodr   r   r   r   r   r   r      s?   „ ñð €Jà38ô Bð ñ-ó ð-ð ñ'ó ñ'r   r   c                 ó®   — t        | t        j                  «       j                  t        j
                  ddœ¬«      \  }}t        j                  ||¬«       y )NF)ÚtypeÚhandled)Úclient_optionsÚ	mechanism)Úhint)r   r   r   Úoptionsr   r-   Úcapture_event)ÚexcÚeventr4   s      r   r   r   ?   sE   € ä&ØÜ!×,Ñ,Ó.×6Ñ6Ü-×8Ñ8ÀUÑKôK€Eˆ4ô
 ×Ñ˜U¨Ö.r   )r'   r%   r   Úsentry_sdk.utilsr   r   Úsentry_sdk.integrationsr   Úsentry_sdk._typesr   Úcollections.abcr   Útypingr   r	   r   r   r   r   r   ú<module>r>      s2   ðÛ Û 
ã ß NÝ /Ý +áÝ(ß&ô.'˜ô .'ób/r   