From 718ab0963f012606f48cd6cf993761ec04521b44 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Fri, 11 Jul 2008 07:52:11 -0700 Subject: [PATCH] IGN:... --- src/calibre/gui2/main.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/calibre/gui2/main.py b/src/calibre/gui2/main.py index b70f02c576..d09922848f 100644 --- a/src/calibre/gui2/main.py +++ b/src/calibre/gui2/main.py @@ -1259,12 +1259,12 @@ path_to_ebook to the database. if __name__ == '__main__': try: sys.exit(main()) - except: + except Exception, err: if not iswindows: raise + tb = traceback.format_exc() from PyQt4.QtGui import QErrorMessage logfile = os.path.join(os.path.expanduser('~'), 'calibre.log') if os.path.exists(logfile): - log = open(logfile).read() - if log.strip(): - d = QErrorMessage() - d.showMessage(log) + log = open(logfile).read().decode('utf-8', 'ignore') + d = QErrorMessage('Error:%s
Traceback:
%sLog:
'%(unicode(err), unicode(tb), log)) + d.exec_()