Skip to content

Commit

Permalink
Merge pull request #5770 from drew2a/sentry_cange_call_order
Browse files Browse the repository at this point in the history
Change capture_exception call order
  • Loading branch information
drew2a committed Dec 2, 2020
2 parents ef334df + c7f4ed4 commit 6572ec9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/tribler-core/tribler_core/session.py
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,6 @@ def unhandled_error_observer(self, loop, context):
SentryReporter.ignore_logger(self._logger.name)

exception = context.get('exception')
SentryReporter.capture_exception(exception)
ignored_message = None
try:
ignored_message = IGNORED_ERRORS.get(
Expand All @@ -250,6 +249,7 @@ def unhandled_error_observer(self, loop, context):
text_long = text_long + "\n--LONG TEXT--\n" + buffer.getvalue()
text_long = text_long + "\n--CONTEXT--\n" + str(context)
self._logger.error("Unhandled exception occurred! %s", text_long, exc_info=None)
SentryReporter.capture_exception(exception)
sentry_event = SentryReporter.last_event

if not self.api_manager:
Expand Down

0 comments on commit 6572ec9

Please sign in to comment.