AlkantarClanX12

Your IP : 3.145.108.43


Current Path : /opt/alt/python27/lib/python2.7/site-packages/raven/
Upload File :
Current File : //opt/alt/python27/lib/python2.7/site-packages/raven/events.pyc

�
��Yc@@s�dZddlmZddlZddlZddlmZddlmZm	Z	dZ
defd
��YZe
ed�r�d�Zn	d
�Zdefd��YZdefd��YZd	efd��YZdS(s�
raven.events
~~~~~~~~~~~~

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

i(tabsolute_importN(t
to_unicode(tget_stack_infotiter_traceback_framest	BaseEventt	ExceptiontMessagetQuerycB@s,eZd�Zd�Zd�Zd�ZRS(cC@s||_tjt�|_dS(N(tclienttloggingt	getLoggert__name__tlogger(tselfR((s=/opt/alt/python27/lib/python2.7/site-packages/raven/events.pyt__init__s	cC@s
t�dS(N(tNotImplementedError(R
tdata((s=/opt/alt/python27/lib/python2.7/site-packages/raven/events.pyt	to_stringscK@siS(N((R
tkwargs((s=/opt/alt/python27/lib/python2.7/site-packages/raven/events.pytcapturescC@s|jj|�S(N(Rt	transform(R
tvalue((s=/opt/alt/python27/lib/python2.7/site-packages/raven/events.pyR s(Rt
__module__RRRR(((s=/opt/alt/python27/lib/python2.7/site-packages/raven/events.pyRs			t__suppress_context__cc@s�|V|\}}}t�}|j|�xltr�|jrH|j}n	|j}||kraPn|j|�|dkr~Pnt|�||jfVq-WdS(s�
        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(	tsettaddtTrueRt	__cause__t__context__tNonettypet
__traceback__(texc_infotexc_typetexct
exc_tracebacktcontext((s=/opt/alt/python27/lib/python2.7/site-packages/raven/events.pyt_chained_exceptions(s	
			
cc@s	|VdS(N((R ((s=/opt/alt/python27/lib/python2.7/site-packages/raven/events.pyR%CscB@s2eZdZdZd�Zd�Zdd�ZRS(s�
    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)

    t	exceptioncC@s=||jdd}|dr5d|d|dfS|dS(Ntvaluesi����Rs%s: %sR(tname(R
RR"((s=/opt/alt/python27/lib/python2.7/site-packages/raven/events.pyRTs
cC@s�tt|�d|jd|jj�}t|dd
�}|rNt|�}nt|dd�}it|�d6t|�d6t|�d6|d	6S(sH
        Convert exception info to a value for the values list.
        ttransformertcapture_localsRRs	<unknown>RRtmodulet
stacktraceN(	RRRRR*tgetattrRtstrR(R
R!t	exc_valueR#t
stack_infot
exc_module((s=/opt/alt/python27/lib/python2.7/site-packages/raven/events.pyt
_get_valueZs	


cK@s�|s|tkr"tj�}n|s7td��ng}x3t|�D]%}|j|�}|jd|�qJWi|jdtj	�d6i|d6|j
6S(NsNo exception founditlevelR'(RtsysR t
ValueErrorR%R2tinserttgetR	tERRORR((R
R RR'R((s=/opt/alt/python27/lib/python2.7/site-packages/raven/events.pyRpsN(RRt__doc__R(RR2RR(((s=/opt/alt/python27/lib/python2.7/site-packages/raven/events.pyRGs
			cB@s,eZdZdZd�Zddd�ZRS(s{
    Messages store the following metadata:

    - message: 'My message from %s about %s'
    - params: ('foo', 'bar')
    ssentry.interfaces.MessagecC@s||jdS(Ntmessage(R((R
R((s=/opt/alt/python27/lib/python2.7/site-packages/raven/events.pyR�scK@s]t|�}ii|d6|j|�d6|d6|j6}d|krY|pO||d<n|S(NR:tparamst	formatted(RRR((R
R:R;R<RR((s=/opt/alt/python27/lib/python2.7/site-packages/raven/events.pyR�s(N(RRR9R(RRR(((s=/opt/alt/python27/lib/python2.7/site-packages/raven/events.pyR�s	cB@s&eZdZdZd�Zd�ZRS(sw
    Messages store the following metadata:

    - query: 'SELECT * FROM table'
    - engine: 'postgesql_psycopg2'
    ssentry.interfaces.QuerycC@s||j}|dS(Ntquery(R((R
Rtsql((s=/opt/alt/python27/lib/python2.7/site-packages/raven/events.pyR�s
cK@s(iit|�d6t|�d6|j6S(NR=tengine(RR.R((R
R=R?R((s=/opt/alt/python27/lib/python2.7/site-packages/raven/events.pyR�s
(RRR9R(RR(((s=/opt/alt/python27/lib/python2.7/site-packages/raven/events.pyR�s	(RRRR(R9t
__future__RR	R4traven.utils.encodingRtraven.utils.stacksRRt__all__tobjectRthasattrRR%RR(((s=/opt/alt/python27/lib/python2.7/site-packages/raven/events.pyt<module>s	;