コード例 #1
0
ファイル: views.py プロジェクト: GabeStah/Airbrake.io
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
ファイル: middleware.py プロジェクト: epbdev/django-airbrake
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
ファイル: decorators.py プロジェクト: rynmlng/airbrake-django
 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
ファイル: middleware.py プロジェクト: samant/airbrake-django
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)