<!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>
B
    Yd                 @   sZ   d Z ddlmZ ddlZddlZddlmZ ddlmZ ddl	m
Z
 G dd dejZdS )	z
raven.contrib.webpy
~~~~~~~~~~~~~~~~~~~

:copyright: (c) 2013 by the Sentry Team, see AUTHORS for more details.
:license: BSD, see LICENSE for more details.
    )absolute_importN)setup_logging)SentryHandler)get_data_from_requestc               @   s:   e Zd ZdZdddZdd Zdd Zd	d
 Zdd ZdS )SentryApplicationa  
    Web.py application for Sentry.

    >>> sentry = Sentry(client, mapping=urls, fvars=globals())

    Automatically configure logging::

    >>> sentry = Sentry(client, logging=True, mapping=urls, fvars=globals())

    Capture an exception::

    >>> try:
    >>>     1 / 0
    >>> except ZeroDivisionError:
    >>>     sentry.captureException()

    Capture a message::

    >>> sentry.captureMessage('hello, world!')
    Fc             K   s4   || _ || _| jr tt| j  tjj| f| d S )N)clientloggingr   r   webapplication__init__)selfr   r   kwargs r   M/opt/alt/python37/lib/python3.7/site-packages/raven/contrib/webpy/__init__.pyr   )   s
    zSentryApplication.__init__c             O   s"   | j j|dt d| id d S )Nexc_infoZapp)r   dataextra)r   captureExceptiongetr   )r   argsr   r   r   r   handle_exception0   s    z"SentryApplication.handle_exceptionc             C   s8   yt j| S  tk
r2   | jt d  Y nX d S )N)r   )r	   r
   handle	Exceptionr   sysr   )r   r   r   r   r   9   s
    zSentryApplication.handlec             O   s8   | j std|d}|d kr*t |d< | j j||S )Nz5captureException called before application configuredr   )r   AssertionErrorr   r   r   )r   r   r   r   r   r   r   r   @   s
    

z"SentryApplication.captureExceptionc             O   s8   | j std|d}|d kr*t |d< | j j||S )Nz3captureMessage called before application configuredr   )r   r   r   r   captureMessage)r   r   r   r   r   r   r   r   H   s
    

z SentryApplication.captureMessageN)F)	__name__
__module____qualname____doc__r   r   r   r   r   r   r   r   r   r      s   
	r   )r   
__future__r   r   r	   Z
raven.confr   Zraven.handlers.loggingr   Zraven.contrib.webpy.utilsr   r
   r   r   r   r   r   <module>   s   