bgAdZddlmZddlZddlZddlmZddlmZm Z dZ Gdde Z e ed rd Znd ZGd d e ZGdde ZGdde 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_infoiter_traceback_frames) BaseEvent ExceptionMessageQueryc&eZdZdZdZdZdZdS)rcP||_tjt|_dSN)clientlogging getLogger__name__logger)selfrs C/opt/cloudlinux/venv/lib64/python3.11/site-packages/raven/events.py__init__zBaseEvent.__init__s '11 ctr )NotImplementedErrorrdatas r to_stringzBaseEvent.to_strings!!rc iSr )rkwargss rcapturezBaseEvent.captures   rc6|j|Sr )r transform)rvalues rr!zBaseEvent.transform s{$$U+++rN)r __module__ __qualname__rrrr!rrrrrsP222"""   ,,,,,rr__suppress_context__c#K|V|\}}}t}|| |jr|j}n|j}||vrdS|||dSt |||jfVO)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). TN)setaddr% __cause__ __context__type __traceback__)exc_infoexc_typeexc exc_tracebackcontexts r_chained_exceptionsr2(s'/$#}%% C 4' &mog~~ KK   {s))S#"33 3 3 3 4rc#K|VdSr r)r-s rr2r2Csrc*eZdZdZdZdZdZddZdS)rz 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) exceptioncz||jdd}|dr|dd|dS|dS)Nvaluesr"r+z: name)rrr/s rrzException.to_stringTsF49oh'+ w< :"6{{{CLL9 96{rc tt||j|jj}t |dd}|rt |}t |dd}t|t |t||dS)zH Convert exception info to a value for the values list. ) transformercapture_localsr#Nrz )r"r+module stacktrace)rrr!rr=getattrstrr)rr. exc_valuer0 stack_info exc_modules r _get_valuezException._get_valueZs$ !- 0 0;5   X|T::  )ZJ8Z== **MM ,,$    rNc |r|durtj}|stdg}t|D]"}|j|}|d|#d|dtj|j d|iiS)NTzNo exception foundrlevelr7) sysr- ValueErrorr2rEinsertgetrERRORr:)rr-rr7r"s rrzException.captureps &8t++|~~H 3122 2+H55 $ $H#DOX.E MM!U # # # # VZZ77 I&)  rr )rr#r$__doc__r:rrErrrrrrGsW D    ,      rrc$eZdZdZdZdZddZdS)r z{ Messages store the following metadata: - message: 'My message from %s about %s' - params: ('foo', 'bar') zsentry.interfaces.Messagec(||jdS)Nmessager9rs rrzMessage.to_stringsDIy))rrNc zt|}|j||||di}d|vr|p||d<|S)N)rPparams formattedrP)rr:r!)rrPrRrSrrs rrzMessage.capturesZW%% I"..00&  D '27DO r)rNrr#r$rMr:rrrrrr r sH 'D***      rr c"eZdZdZdZdZdZdS)r zw Messages store the following metadata: - query: 'SELECT * FROM table' - engine: 'postgesql_psycopg2' zsentry.interfaces.Queryc,||j}|dS)Nqueryr9)rrsqls rrzQuery.to_strings49o7|rc N|jt|t|diS)N)rWengine)r:rrA)rrWrZrs rrz Query.captures/ I#E**f++  rNrTrrrr r sC %D     rr )rM __future__rrrHraven.utils.encodingrraven.utils.stacksrr__all__objectrhasattrrr2r r rrrrasQ'&&&&& ++++++DDDDDDDD 8 , , , , , , , ,& 79,--444468 8 8 8 8 8 8 8 vi6     I     r