From f163eac853b861f27288211cb85ce23a7f35742b Mon Sep 17 00:00:00 2001 From: Ciro Mattia Gonano Date: Wed, 6 Mar 2013 11:33:28 +0100 Subject: [PATCH] Make GUI error reporting more useful --- kcc/gui.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/kcc/gui.py b/kcc/gui.py index 9f98590..6ba7e4d 100644 --- a/kcc/gui.py +++ b/kcc/gui.py @@ -31,6 +31,7 @@ from subprocess import call import os import shutil import stat +import traceback class MainWindow: @@ -151,8 +152,10 @@ class MainWindow: try: subargv.append(entry) epub_path = comic2ebook.main(subargv) - except Exception, err: - tkMessageBox.showerror('Error comic2ebook', "Error on file %s:\n%s" % (subargv[-1], str(err))) + except Exception as err: + type_, value_, traceback_ = sys.exc_info() + tkMessageBox.showerror('KCC Error', "Error on file %s:\n%s\nTraceback:\n%s" % + (subargv[-1], str(err), traceback.format_tb(traceback_))) errors = True continue if self.options['epub_only'] == 1: