mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix #271
This commit is contained in:
parent
605ded0900
commit
38402d7e56
@ -646,9 +646,9 @@ class Main(MainWindow, Ui_MainWindow):
|
||||
'''
|
||||
Handle exceptions in threaded jobs.
|
||||
'''
|
||||
print >>sys.stderr, 'Error in job:', description
|
||||
print >>sys.stderr, exception
|
||||
print >>sys.stderr, formatted_traceback
|
||||
print >>sys.stderr, 'Error in job:', description.encode('utf8')
|
||||
print >>sys.stderr, exception.encode('utf8')
|
||||
print >>sys.stderr, formatted_traceback.encode('utf8')
|
||||
if not self.device_error_dialog.isVisible():
|
||||
msg = u'<p><b>%s</b>: '%(exception.__class__.__name__,) + unicode(str(exception), 'utf8', 'replace') + u'</p>'
|
||||
msg += u'<p>Failed to perform <b>job</b>: '+description
|
||||
@ -659,10 +659,10 @@ class Main(MainWindow, Ui_MainWindow):
|
||||
self.device_error_dialog.show()
|
||||
|
||||
def conversion_job_exception(self, id, description, exception, formatted_traceback, log):
|
||||
print >>sys.stderr, 'Error in job:', description
|
||||
print >>sys.stderr, log
|
||||
print >>sys.stderr, exception
|
||||
print >>sys.stderr, formatted_traceback
|
||||
print >>sys.stderr, 'Error in job:', description.encode('utf8')
|
||||
print >>sys.stderr, log.encode('utf8')
|
||||
print >>sys.stderr, exception.encode('utf8')
|
||||
print >>sys.stderr, formatted_traceback.encode('utf8')
|
||||
msg = u'<p><b>%s</b>: '%(exception.__class__.__name__,) + unicode(str(exception), 'utf8', 'replace') + u'</p>'
|
||||
msg += u'<p>Failed to perform <b>job</b>: '+description
|
||||
msg += u'<p>Detailed <b>traceback</b>:<pre>'
|
||||
@ -731,4 +731,4 @@ def main(args=sys.argv):
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
sys.exit(main())
|
||||
sys.exit(main())
|
||||
|
Loading…
x
Reference in New Issue
Block a user