示例#1
0
    def handle_exception(self, *args, **kwargs):
        if not self.client:
            return

        self.client.captureException(
            exc_info=kwargs.get("exc_info"), data=get_data_from_request(request), extra={"app": self.app}
        )
示例#2
0
文件: __init__.py 项目: twoolie/raven
 def _handle_exception(*args, **kwargs):
     client.capture(
         "Exception",
         exc_info=kwargs.get("exc_info"),
         data=get_data_from_request(request),
         extra={"app": self.app},
     )
示例#3
0
文件: __init__.py 项目: Kronuz/raven
 def _handle_exception(sender, **kwargs):
     client.capture('Exception', exc_info=kwargs.get('exc_info'),
         data=get_data_from_request(request),
         extra={
             'app': sender.name,
         },
     )
示例#4
0
 def _handle_exception(sender, **kwargs):
     client.capture(
         'Exception',
         exc_info=kwargs.get('exc_info'),
         data=get_data_from_request(request),
         extra={
             'app': sender.name,
         },
     )
示例#5
0
 def captureMessage(self, *args, **kwargs):
     assert self.client, "captureMessage called before application configured"
     data = kwargs.get("data")
     if data is None:
         try:
             kwargs["data"] = get_data_from_request(request)
         except RuntimeError:
             # app is probably not configured yet
             pass
     return self.client.captureMessage(*args, **kwargs)
示例#6
0
 def captureException(self, *args, **kwargs):
     assert self.client, 'captureException called before application configured'
     data = kwargs.get('data')
     if data is None:
         try:
             kwargs['data'] = get_data_from_request(request)
         except RuntimeError:
             # app is probably not configured yet
             pass
     return self.client.captureException(*args, **kwargs)
示例#7
0
    def handle_exception(self, *args, **kwargs):
        if not self.client:
            return

        self.client.capture('Exception', exc_info=kwargs.get('exc_info'),
            data=get_data_from_request(request),
            extra={
                'app': self.app,
            },
        )
示例#8
0
    def handle_exception(self, *args, **kwargs):
        if not self.client:
            return

        self.client.capture('Exception', exc_info=kwargs.get('exc_info'),
            data=get_data_from_request(request),
            extra={
                'app': self.app,
            },
        )
示例#9
0
 def captureMessage(self, *args, **kwargs):
     assert self.client, 'captureMessage called before application configured'
     data = kwargs.get('data')
     if data is None:
         try:
             kwargs['data'] = get_data_from_request(request)
         except RuntimeError:
             # app is probably not configured yet
             pass
     return self.client.captureMessage(*args, **kwargs)
示例#10
0
 def inner(*args, **kwargs):
     try:
         return func(*args, **kwargs)
     except Exception:
         if sentry is None:
             raise
         sentry.client.capture('Exception',
             data=get_data_from_request(request),
             extra={
                 'app': app,
             },
         )
         return error("Uh oh. Something went wrong on our end. We've "
             "dispatched trained monkeys to investigate.")
示例#11
0
    def handle_exception(self, *args, **kwargs):
        if not self.client:
            return

        ignored_exc_type_list = self.app.config.get('RAVEN_IGNORE_EXCEPTIONS', [])
        exc = sys.exc_info()[1]

        if any((isinstance(exc, ignored_exc_type) for ignored_exc_type in ignored_exc_type_list)):
            return

        self.client.captureException(
            exc_info=kwargs.get('exc_info'),
            data=get_data_from_request(request),
            extra={
                'app': self.app,
            },
        )
示例#12
0
    def handle_exception(self, *args, **kwargs):
        if not self.client:
            return

        ignored_exc_type_list = self.app.config.get('RAVEN_IGNORE_EXCEPTIONS',
                                                    [])
        exc = sys.exc_info()[1]

        if any((isinstance(exc, ignored_exc_type)
                for ignored_exc_type in ignored_exc_type_list)):
            return

        self.client.captureException(
            exc_info=kwargs.get('exc_info'),
            data=get_data_from_request(request),
            extra={
                'app': self.app,
            },
        )
示例#13
0
 def captureMessage(self, *args, **kwargs):
     assert self.client, 'captureMessage called before application configured'
     data = kwargs.get('data')
     if data is None:
         kwargs['data'] = get_data_from_request(request)
     return self.client.captureMessage(*args, **kwargs)
示例#14
0
 def captureMessage(self, *args, **kwargs):
     assert self.client, 'captureMessage called before application configured'
     data = kwargs.get('data')
     if data is None:
         kwargs['data'] = get_data_from_request(request)
     return self.client.captureMessage(*args, **kwargs)