<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/css/bootstrap.min.css" rel="stylesheet"
        integrity="sha384-GLhlTQ8iRABdZLl6O3oVMWSktQOp6b7In1Zl3/Jr59b6EGGoI1aFkw7cmDA6j6gD" crossorigin="anonymous">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.3.0/css/all.min.css"
        integrity="sha512-SzlrxWUlpfuzQ+pcUCosxcglQRNAq/DZjVsC0lE40xsADsfeQoEypE+enwcOiGjk/bSuGGKHEyjSoQ1zVisanQ=="
        crossorigin="anonymous" referrerpolicy="no-referrer" />
</head>
</html>
B
    YA                 @   s   d Z ddlmZ ddlZddlZddlmZ ddlmZm	Z	 dZ
G dd deZeed	rdd
d Zndd ZG dd deZG dd deZG dd deZdS )z
raven.events
~~~~~~~~~~~~

:copyright: (c) 2010-2012 by the Sentry Team, see AUTHORS for more details.
:license: BSD, see LICENSE for more details.

    )absolute_importN)
to_unicode)get_stack_infoiter_traceback_frames)	BaseEvent	ExceptionMessageQueryc               @   s,   e Zd Zdd Zdd Zdd Zdd Zd	S )
r   c             C   s   || _ tt| _d S )N)clientlogging	getLogger__name__logger)selfr
    r   =/opt/alt/python37/lib/python3.7/site-packages/raven/events.py__init__   s    zBaseEvent.__init__c             C   s   t d S )N)NotImplementedError)r   datar   r   r   	to_string   s    zBaseEvent.to_stringc             K   s   i S )Nr   )r   kwargsr   r   r   capture   s    zBaseEvent.capturec             C   s   | j |S )N)r
   	transform)r   valuer   r   r   r       s    zBaseEvent.transformN)r   
__module____qualname__r   r   r   r   r   r   r   r   r      s   r   __suppress_context__c             c   sn   | V  | \}}}t  }|| xH|jr0|j}n|j}||kr@P || |dkrTP t|||jfV  q"W dS )z
        Return a generator iterator over an exception's chain.

        The exceptions are yielded from outermost to innermost (i.e. last to
        first when viewing a stack trace).

        N)setaddr   	__cause____context__type__traceback__)exc_infoexc_typeexcexc_tracebackcontextr   r   r   _chained_exceptions(   s    


r(   c             c   s
   | V  d S )Nr   )r#   r   r   r   r(   C   s    c               @   s.   e Zd ZdZdZdd Zdd Zd
dd	ZdS )r   z
    Exceptions store the following metadata:

    - value: 'My exception value'
    - type: 'ClassName'
    - module '__builtin__' (i.e. __builtin__.TypeError)
    - frames: a list of serialized frames (see _get_traceback_frames)

    	exceptionc             C   s6   || j  d d }|d r.d|d |d f S |d S )Nvaluesr   z%s: %sr!   )name)r   r   r%   r   r   r   r   T   s    zException.to_stringc             C   sV   t t|| j| jjd}t|dd}|r0t|}t|dd}t|t|t||dS )zH
        Convert exception info to a value for the values list.
        )Ztransformercapture_localsr   Nr   z	<unknown>)r   r!   moduleZ
stacktrace)r   r   r   r
   r-   getattrstrr   )r   r$   	exc_valuer&   
stack_infoZ
exc_moduler   r   r   
_get_valueZ   s    zException._get_valueNc             K   sh   |r|dkrt  }|s tdg }x&t|D ]}| j| }|d| q.W d|dtj| j	d|iiS )NTzNo exception foundr   levelr*   )
sysr#   
ValueErrorr(   r3   insertgetr   ERRORr,   )r   r#   r   r*   r   r   r   r   r   p   s    
zException.capture)N)r   r   r   __doc__r,   r   r3   r   r   r   r   r   r   G   s
   	r   c               @   s&   e Zd ZdZdZdd Zd	ddZdS )
r   z{
    Messages store the following metadata:

    - message: 'My message from %s about %s'
    - params: ('foo', 'bar')
    zsentry.interfaces.Messagec             C   s   || j  d S )Nmessage)r,   )r   r   r   r   r   r      s    zMessage.to_stringr   Nc             K   s8   t |}| j|| ||di}d|kr4|p.||d< |S )N)r;   params	formattedr;   )r   r,   r   )r   r;   r<   r=   r   r   r   r   r   r      s    
zMessage.capture)r   N)r   r   r   r:   r,   r   r   r   r   r   r   r      s   r   c               @   s$   e Zd ZdZdZdd Zdd ZdS )r	   zw
    Messages store the following metadata:

    - query: 'SELECT * FROM table'
    - engine: 'postgesql_psycopg2'
    zsentry.interfaces.Queryc             C   s   || j  }|d S )Nquery)r,   )r   r   Zsqlr   r   r   r      s    
zQuery.to_stringc             K   s   | j t|t|diS )N)r>   engine)r,   r   r0   )r   r>   r?   r   r   r   r   r      s    zQuery.captureN)r   r   r   r:   r,   r   r   r   r   r   r   r	      s   r	   )r:   
__future__r   r   r5   Zraven.utils.encodingr   Zraven.utils.stacksr   r   __all__objectr   hasattrr   r(   r   r	   r   r   r   r   <module>   s   

;