bg jdZddlmZddlZddlmZddlmZddlm Z ddl m Z Gdd e Z dS) z raven.contrib.bottle ~~~~~~~~~~~~~~~~~~~ :copyright: (c) 2013 by the Sentry Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. )absolute_importN)request) setup_logging)get_data_from_request) SentryHandlerc2eZdZdZd dZdZdZdZdZdS) Sentryav Bottle application for Sentry. >>> sentry = Sentry(app, client) Automatically configure logging:: >>> sentry = Sentry(app, client, logging=True) Capture an exception:: >>> try: >>> 1 / 0 >>> except ZeroDivisionError: >>> sentry.captureException() Capture a message:: >>> sentry.captureMessage('hello, world!') Fc||_||_||_|jr!tt |j||j_dSN)appclientloggingrrsentry)selfr r rs n/builddir/build/BUILD/cloudlinux-venv-1.0.7/venv/lib/python3.11/site-packages/raven/contrib/bottle/__init__.py__init__zSentry.__init__)sF  < 6 - 44 5 5 5c|j|dttd|jidS)Nexc_infor )rdataextra)r captureExceptiongetrrr )rargskwargss rhandle_exceptionzSentry.handle_exception1sQ $$ZZ ++&w//tx %     rcdfd } ||S#t$r)tjwxYw)NcN|||||S)Nr)r)statusheadersrrstart_responses rsession_start_responsez/Sentry.__call__..session_start_response;s4#%%x%888!>&'8<< > ! : : :  s !3Ac|js Jd|d}|) tt|d<n#t$rYnwxYw|jj|i|S)Nz5captureException called before application configuredr)r rrr RuntimeErrorrrrrrs rrzSentry.captureExceptionHs{SSSSS{zz&!! < !6w!?!?v    ,t{+Tr9s'&&&&& $$$$$$<<<<<<000000I;I;I;I;I;VI;I;I;I;I;r