1
0

crash reporter: send traceback for full chain of exceptions

Previously if there was a chain of exceptions, we were only
sending the traceback for the final exception.

E.g.
try:
    raise ExcOne("asdasd")
except ExcOne() as e:
    raise ExcTwo("qweqwe") from e

^ we would lose all info about ExcOne, including potentially many lines of trace
This commit is contained in:
SomberNight
2021-07-12 19:24:58 +02:00
parent ee391a4932
commit d0f0669e8f
2 changed files with 12 additions and 5 deletions

View File

@@ -145,11 +145,11 @@ class Exception_Window(BaseCrashReporter, QWidget, MessageBoxMixin, Logger):
wallet_types = Exception_Hook._INSTANCE.wallet_types_seen
return ",".join(wallet_types)
def _get_traceback_str(self) -> str:
def _get_traceback_str_to_display(self) -> str:
# The msg_box that shows the report uses rich_text=True, so
# if traceback contains special HTML characters, e.g. '<',
# they need to be escaped to avoid formatting issues.
traceback_str = super()._get_traceback_str()
traceback_str = super()._get_traceback_str_to_display()
return html.escape(traceback_str)