@ -33,6 +33,8 @@ from PyQt5.QtWidgets import (QWidget, QLabel, QPushButton, QTextEdit,
from electrum . i18n import _
from electrum . base_crash_reporter import BaseCrashReporter
from electrum . logging import Logger
from electrum import constants
from . util import MessageBoxMixin , read_QIcon , WaitingDialog
@ -97,17 +99,22 @@ class Exception_Window(BaseCrashReporter, QWidget, MessageBoxMixin, Logger):
def send_report ( self ) :
def on_success ( response ) :
# note: 'response' coming from (remote) crash reporter server.
# It contains a URL to the GitHub issue, so we allow rich text.
self . show_message ( parent = self ,
title = _ ( " Crash report " ) ,
msg = response )
msg = response ,
rich_text = True )
self . close ( )
def on_failure ( exc_info ) :
e = exc_info [ 1 ]
self . logger . error ( ' There was a problem with the automatic reporting ' , exc_info = exc_info )
self . show_critical ( parent = self ,
msg = ( _ ( ' There was a problem with the automatic reporting: ' ) + ' \n ' +
str ( e ) + ' \n ' +
_ ( " Please report this issue manually. " ) ) )
msg = ( _ ( ' There was a problem with the automatic reporting: ' ) + ' <br/> ' +
repr ( e ) [ : 120 ] + ' <br/> ' +
_ ( " Please report this issue manually " ) +
f ' <a href= " { constants . GIT_REPO_ISSUES_URL } " >on GitHub</a>. ' ) ,
rich_text = True )
proxy = self . main_window . network . proxy
task = lambda : BaseCrashReporter . send_report ( self , self . main_window . network . asyncio_loop , proxy )