Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/Ultimaker/Cura.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGhostkeeper <rubend@tutanota.com>2022-02-21 13:52:28 +0300
committerGhostkeeper <rubend@tutanota.com>2022-02-21 13:52:28 +0300
commitc7d7dd11d143c804d0c1b3ff67fc6f89ed5171e6 (patch)
treedb5f78d4f88e85e01c408c03d3298c95cd14ebb9 /cura/CrashHandler.py
parent28924a1c87032e29306d0fca067bb39abc2accf2 (diff)
parent614fe6fd4f0b6370b731c11d3cf5395f788b9ad4 (diff)
Merge branch 'master' into PyQt6_upgrade
Conflicts: cura/PlatformPhysics.py -> Removed shapely on master, while QTimer import got updated to Qt6. plugins/Toolbox -> Entire folder is deleted in master, but it was updated to Qt6 here. This can all be removed.
Diffstat (limited to 'cura/CrashHandler.py')
-rw-r--r--cura/CrashHandler.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/cura/CrashHandler.py b/cura/CrashHandler.py
index f5ce13e04b..bda9568666 100644
--- a/cura/CrashHandler.py
+++ b/cura/CrashHandler.py
@@ -15,7 +15,7 @@ from typing import cast, Any
try:
from sentry_sdk.hub import Hub
from sentry_sdk.utils import event_from_exception
- from sentry_sdk import configure_scope
+ from sentry_sdk import configure_scope, add_breadcrumb
with_sentry_sdk = True
except ImportError:
with_sentry_sdk = False
@@ -424,6 +424,13 @@ class CrashHandler:
if with_sentry_sdk:
try:
hub = Hub.current
+ if not Logger.getLoggers():
+ # No loggers have been loaded yet, so we don't have any breadcrumbs :(
+ # So add them manually so we at least have some info...
+ add_breadcrumb(level = "info", message = "SentryLogging was not initialised yet")
+ for log_type, line in Logger.getUnloggedLines():
+ add_breadcrumb(message=line)
+
event, hint = event_from_exception((self.exception_type, self.value, self.traceback))
hub.capture_event(event, hint=hint)
hub.flush()