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)
|
QMainWindow.__init__(self, parent)
|
||||||
|
|
||||||
def unhandled_exception(self, type, value, tb):
|
def unhandled_exception(self, type, value, tb):
|
||||||
sio = StringIO.StringIO()
|
try:
|
||||||
traceback.print_exception(type, value, tb, file=sio)
|
sio = StringIO.StringIO()
|
||||||
fe = sio.getvalue()
|
traceback.print_exception(type, value, tb, file=sio)
|
||||||
print >>sys.stderr, fe
|
fe = sio.getvalue()
|
||||||
msg = '<p><b>' + unicode(str(value), 'utf8', 'replace') + '</b></p>'
|
print >>sys.stderr, fe
|
||||||
msg += '<p>Detailed <b>traceback</b>:<pre>'+fe+'</pre>'
|
msg = '<p><b>' + unicode(str(value), 'utf8', 'replace') + '</b></p>'
|
||||||
d = ConversionErrorDialog(self, 'ERROR: Unhandled exception', msg)
|
msg += '<p>Detailed <b>traceback</b>:<pre>'+fe+'</pre>'
|
||||||
d.exec_()
|
d = ConversionErrorDialog(self, 'ERROR: Unhandled exception', msg)
|
||||||
|
d.exec_()
|
||||||
|
except:
|
||||||
|
pass
|
Loading…
x
Reference in New Issue
Block a user