AlkantarClanX12
Current Path : /opt/alt/python37/lib/python3.7/site-packages/raven/__pycache__/ |
Current File : //opt/alt/python37/lib/python3.7/site-packages/raven/__pycache__/events.cpython-37.pyc |
B ��YA � @ s� d Z ddlmZ ddlZddlZddlmZ ddlmZm Z dZ G dd� de�Ze ed �rdd d� Zndd� ZG d d� de�ZG dd� de�ZG dd� de�ZdS )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 Zd Zdd� Zdd� Zdd� Zdd� Zd 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 zBaseEvent.__init__c C s t �d S )N)�NotImplementedError)r �datar r r � to_string s zBaseEvent.to_stringc K s i S )Nr )r �kwargsr r r �capture s zBaseEvent.capturec C s | j �|�S )N)r � transform)r �valuer r r r s zBaseEvent.transformN)r � __module__�__qualname__r r r r r r r r r s r �__suppress_context__c c sn | V | \}}}t � }|�|� xH|jr0|j}n|j}||kr@P |�|� |dkrTP t|�||jfV q"W dS )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 Zd ZdZdZdd� Zdd� Zd dd �ZdS )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�values���r z%s: %sr! )�name)r r r% r r r r T s zException.to_stringc C sV t t|�| j| jjd�}t|dd�}|r0t|�}t|dd�}t|�t|�t|�|d�S )zH Convert exception info to a value for the values list. )Ztransformer�capture_localsr Nr z <unknown>)r r! �moduleZ stacktrace)r r r r r- �getattr�strr )r r$ � exc_valuer&