예제 #1
0
def index(request):
    try:
        1 / 0
    except Exception as exception:
        airbrake = Client()
        airbrake.notify(exception, request)
    return HttpResponse("Hello, world. You're at the index.")
예제 #2
0
 def __inner__(*args, **kwargs):
     try:
         f(*args, **kwargs)
     except Exception as e:
         from airbrake.utils.client import Client
         c = Client()
         c.notify(exception=e)
         raise e
예제 #3
0
    def __init__(self, *args, **kwargs):
        self.client = Client()

        super(AirbrakeNotifierMiddleware, self).__init__(*args, **kwargs)
예제 #4
0
 def __init__(self):
     self.client = Client()