예제 #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
class AirbrakeNotifierMiddleware(object):
    def __init__(self):
        self.client = Client()

    def process_exception(self, request, exception):
        if hasattr(settings, 'AIRBRAKE') and not settings.AIRBRAKE.get('DISABLE', False):
            self.client.notify(exception=exception, request=request)
예제 #3
0
class AirbrakeNotifierMiddleware(object):
    def __init__(self):
        self.client = Client()

    def process_exception(self, request, exception):
        if not settings.DEBUG:
            self.client.notify(exception=exception, request=request)
예제 #4
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
예제 #5
0
class AirbrakeNotifierMiddleware(MiddlewareMixin):
    def __init__(self, *args, **kwargs):
        self.client = Client()
        super(AirbrakeNotifierMiddleware, self).__init__(*args, **kwargs)

    def process_exception(self, request, exception):
        if hasattr(settings,
                   'AIRBRAKE') and not settings.AIRBRAKE.get('DISABLE', False):
            self.client.notify(exception=exception, request=request)
예제 #6
0
class AirbrakeNotifierMiddleware(MiddlewareMixin):
    def __init__(self, *args, **kwargs):
        self.client = Client()

        super(AirbrakeNotifierMiddleware, self).__init__(*args, **kwargs)

    def process_exception(self, request, exception):
        if hasattr(settings, 'AIRBRAKE') and not settings.AIRBRAKE.get('DISABLE', False):
            self.client.notify(exception=exception, request=request)
예제 #7
0
    def __inner__(*args, **kwargs):
        try:
            f(*args, **kwargs)
        except Exception, e:
            from airbrake.utils.client import Client

            c = Client()
            c.notify(exception=e)
            raise e
예제 #8
0
    def __init__(self, *args, **kwargs):
        self.client = Client()

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

    def process_exception(self, request, exception):
        self.client.notify(exception=exception, request=request)
예제 #11
0
    def __init__(self, *args, **kwargs):
        self.client = Client()

        super(AirbrakeNotifierMiddleware, self).__init__(*args, **kwargs)