<!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>
ó
¿öYc           @@  s|   d  Z  d d l m Z d d l Z d d l m Z d d l m Z d d l m	 Z	 d d l
 m Z d e f d	 „  ƒ  YZ d S(
   sŸ   
raven.contrib.bottle
~~~~~~~~~~~~~~~~~~~

:copyright: (c) 2013 by the Sentry Team, see AUTHORS for more details.
:license: BSD, see LICENSE for more details.
i    (   t   absolute_importN(   t   request(   t   setup_logging(   t   get_data_from_request(   t   SentryHandlert   Sentryc           B@  s>   e  Z d  Z e d „ Z d „  Z d „  Z d „  Z d „  Z RS(   sv  
    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!')
    c         C@  sJ   | |  _  | |  _ | |  _ |  j r: t t |  j ƒ ƒ n  |  |  j  _ d  S(   N(   t   appt   clientt   loggingR   R   t   sentry(   t   selfR   R   R   (    (    sN   /opt/alt/python27/lib/python2.7/site-packages/raven/contrib/bottle/__init__.pyt   __init__)   s    				c      	   O@  s<   |  j  j d | j d ƒ d t t ƒ d i |  j d 6ƒ d  S(   Nt   exc_infot   datat   extraR   (   R   t   captureExceptiont   getR   R   R   (   R
   t   argst   kwargs(    (    sN   /opt/alt/python27/lib/python2.7/site-packages/raven/contrib/bottle/__init__.pyt   handle_exception1   s
    c         @  sZ   d  ‡  ‡ f d † } y ˆ  j | | ƒ SWn* t k
 rU ˆ  j d t j ƒ  ƒ ‚  n Xd  S(   Nc         @  s/   | d  k	 r ˆ  j d | ƒ n  ˆ |  | | ƒ S(   NR   (   t   NoneR   (   t   statust   headersR   (   R
   t   start_response(    sN   /opt/alt/python27/lib/python2.7/site-packages/raven/contrib/bottle/__init__.pyt   session_start_response;   s    R   (   R   R   t	   ExceptionR   t   sysR   (   R
   t   environR   R   (    (   R
   R   sN   /opt/alt/python27/lib/python2.7/site-packages/raven/contrib/bottle/__init__.pyt   __call__:   s    c         O@  sn   |  j  s t d ƒ ‚ | j d ƒ } | d  k r[ y t t ƒ | d <Wq[ t k
 rW q[ Xn  |  j  j | | Ž  S(   Ns5   captureException called before application configuredR   (   R   t   AssertionErrorR   R   R   R   t   RuntimeErrorR   (   R
   R   R   R   (    (    sN   /opt/alt/python27/lib/python2.7/site-packages/raven/contrib/bottle/__init__.pyR   H   s    c         O@  sn   |  j  s t d ƒ ‚ | j d ƒ } | d  k r[ y t t ƒ | d <Wq[ t k
 rW q[ Xn  |  j  j | | Ž  S(   Ns3   captureMessage called before application configuredR   (   R   R   R   R   R   R   R   t   captureMessage(   R
   R   R   R   (    (    sN   /opt/alt/python27/lib/python2.7/site-packages/raven/contrib/bottle/__init__.pyR   S   s    (	   t   __name__t
   __module__t   __doc__t   FalseR   R   R   R   R   (    (    (    sN   /opt/alt/python27/lib/python2.7/site-packages/raven/contrib/bottle/__init__.pyR      s   				(   R"   t
   __future__R    R   t   bottleR   t
   raven.confR   t   raven.contrib.bottle.utilsR   t   raven.handlers.loggingR   t   objectR   (    (    (    sN   /opt/alt/python27/lib/python2.7/site-packages/raven/contrib/bottle/__init__.pyt   <module>   s   