add stack trace to fatal error

This commit is contained in:
LeonOstrez
2025-06-11 15:29:33 +02:00
parent 4a89bf1029
commit 39c0567848

View File

@@ -2,6 +2,7 @@ import asyncio
import atexit
import signal
import sys
import traceback
from argparse import Namespace
from asyncio import run
@@ -102,11 +103,13 @@ async def run_project(sm: StateManager, ui: UIBase, args) -> bool:
async def send_error(ui: UIBase, error_source: str, err: Exception):
stack_trace = traceback.format_exc()
await ui.send_fatal_error(
f"Stopping Pythagora due to {error_source}:\n\n{err}",
source=pythagora_source,
extra_info={
"fatal_error": True,
"stack_trace": stack_trace,
},
)
capture_exception(err)