mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Dont report exceptions in error handler.
This commit is contained in:
parent
5e19ae43e1
commit
4b822e533c
@ -24,11 +24,14 @@ class MainWindow(QMainWindow):
|
||||
QMainWindow.__init__(self, parent)
|
||||
|
||||
def unhandled_exception(self, type, value, tb):
|
||||
sio = StringIO.StringIO()
|
||||
traceback.print_exception(type, value, tb, file=sio)
|
||||
fe = sio.getvalue()
|
||||
print >>sys.stderr, fe
|
||||
msg = '<p><b>' + unicode(str(value), 'utf8', 'replace') + '</b></p>'
|
||||
msg += '<p>Detailed <b>traceback</b>:<pre>'+fe+'</pre>'
|
||||
d = ConversionErrorDialog(self, 'ERROR: Unhandled exception', msg)
|
||||
d.exec_()
|
||||
try:
|
||||
sio = StringIO.StringIO()
|
||||
traceback.print_exception(type, value, tb, file=sio)
|
||||
fe = sio.getvalue()
|
||||
print >>sys.stderr, fe
|
||||
msg = '<p><b>' + unicode(str(value), 'utf8', 'replace') + '</b></p>'
|
||||
msg += '<p>Detailed <b>traceback</b>:<pre>'+fe+'</pre>'
|
||||
d = ConversionErrorDialog(self, 'ERROR: Unhandled exception', msg)
|
||||
d.exec_()
|
||||
except:
|
||||
pass
|
Loading…
x
Reference in New Issue
Block a user