Unifica finestre errori con testo completo, copia ed esportazione

This commit is contained in:
2026-10-23 10:57:35 +02:00
parent fc43cbb7ec
commit 9d87b07648
24 changed files with 570 additions and 66 deletions

View File

@@ -98,13 +98,15 @@ def configure_exception_logging(app_name: str, root=None, loop=None) -> None:
def _tk_exception(exc_type, exc, tb):
log_exception(app_name, exc, context="tkinter callback")
try:
import tkinter.messagebox as messagebox
import error_dialog as messagebox
messagebox.showerror(
app_name,
"Errore applicativo registrato nei log.\n\n"
"Se l'operazione era in corso, ripeterla o avvisare il responsabile.",
parent=root,
exception=exc,
context="tkinter callback",
)
except Exception:
pass
@@ -150,7 +152,7 @@ def show_fatal_message(app_name: str, exc: BaseException) -> None:
try:
import tkinter as tk
from tkinter import messagebox
import error_dialog as messagebox
root = tk.Tk()
root.withdraw()
@@ -161,6 +163,7 @@ def show_fatal_message(app_name: str, exc: BaseException) -> None:
f"Se non ci sono, controlla anche:\n{TEMP_DIR}\n\n"
f"{exc}",
parent=root,
exception=exc,
)
root.destroy()
except Exception: