mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-05-08 21:24:57 +02:00
Fix #271
This commit is contained in:
parent
605ded0900
commit
38402d7e56
1 changed files with 8 additions and 8 deletions
|
|
@ -646,9 +646,9 @@ def device_job_exception(self, id, description, exception, formatted_traceback):
|
|||
'''
|
||||
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 @@ def device_job_exception(self, id, description, exception, formatted_traceback):
|
|||
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…
Reference in a new issue