retronews

a featureful fork of the luke8086/retronews hn+lobste.rs tui
Log | Files | Refs | README | LICENSE

commit 9be91ab64e398a1f41477c012ea25bb782e49cda
parent b4f88eb4786c180395327652764e7a16a2aca784
Author: luke8086 <55237178+luke8086@users.noreply.github.com>
Date:   Sat, 20 Apr 2024 20:04:24 +0000

Log exception tracebacks in app_safe_run

Diffstat:
Mretronews.py | 2++
1 file changed, 2 insertions(+), 0 deletions(-)

diff --git a/retronews.py b/retronews.py @@ -23,6 +23,7 @@ import logging import os import re import sqlite3 +import traceback import unicodedata import urllib.request import webbrowser @@ -1136,6 +1137,7 @@ def app_safe_run(app: AppState, fn: Callable[[], T], flash: Optional[str]) -> Op try: ret = fn() except Exception as e: + logging.debug("\n".join(traceback.format_exception(e))) app_show_flash(app, f"Error: {e}") else: if flash is not None: