OwlCyberSecurity - MANAGER
Edit File: excepthook.cpython-312.pyc
� G��gh � � � d dl Z d dlZd dlmZmZ d dlmZ d dlmZ er.d dlm Z d dlm Z d dlmZ d dlmZ d d l mZ e ee eee ge f Z G d � de� Zd� Zdd �Zy)� N)�capture_internal_exceptions�event_from_exception)�Integration)� TYPE_CHECKING)�Callable)�Any)�Type)�Optional)� TracebackTypec �, � e Zd ZdZdZdd�Zed� � Zy)�ExcepthookIntegration� excepthookFc �P � t |t � st d|�d�� �|| _ y )NzInvalid value for always_run: z (must be type boolean))� isinstance�bool� ValueError� always_run)�selfr s �Q/opt/hc_python/lib/python3.12/site-packages/sentry_sdk/integrations/excepthook.py�__init__zExcepthookIntegration.__init__ s, � � �*�d�+��� �� � %��� c �H � t t j � t _ y )N)�_make_excepthook�sysr � r r � setup_oncez ExcepthookIntegration.setup_once) s � � *�#�.�.�9��r N�F)�__name__� __module__�__qualname__� identifierr r �staticmethodr r r r r r s% � ��J��J�%� �:� �:r r c � � � � fd�}|S )Nc �z �� t j � j t � }|� �| ||� S t |j � r]t � 5 t | ||ft j � j ddd��� \ }}t j ||�� d d d � �| ||� S # 1 sw Y �xY w)Nr F)�type�handled)�client_options� mechanism)�hint) � sentry_sdk� get_client�get_integrationr �_should_sendr r r �options� capture_event)�type_�value� traceback�integration�eventr) �old_excepthooks �r �sentry_sdk_excepthookz/_make_excepthook.<locals>.sentry_sdk_excepthook1 s� �� � �+�+�-�=�=�>S�T�� ��!�%�� �:�:���.�.�/�,�.�2��E�9�-�#-�#8�#8�#:�#B�#B�'3��F����t� �(�(��T�:� /� �e�U�I�6�6� /�.�s �AB1�1B:r )r5 r6 s ` r r r / s �� �7�* !� r c �, � | ryt t d� ryy)NT�ps1F)�hasattrr )r s r r- r- I s � ����s�E�� �r r )r r* �sentry_sdk.utilsr r �sentry_sdk.integrationsr �typingr r r r r �typesr � BaseException� Excepthookr r r- r r r �<module>r@ sf �� � �� 0� ������#�� �m� �m�X�m�-D�E�� ��J�:�K� :�*!�4 r