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.")
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
def __init__(self, *args, **kwargs): self.client = Client() super(AirbrakeNotifierMiddleware, self).__init__(*args, **kwargs)
def __init__(self): self.client = Client()