From a61972e5031ab8170d7a5eaa8b6bb6c3ff3f4ed6 Mon Sep 17 00:00:00 2001 From: "beville@gmail.com" Date: Fri, 15 Feb 2013 00:25:06 +0000 Subject: [PATCH] wrapped a try-catch around script execution git-svn-id: http://comictagger.googlecode.com/svn/trunk@509 6c5673fe-1810-88d6-992b-cd32ca31540c --- comictaggerlib/options.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/comictaggerlib/options.py b/comictaggerlib/options.py index 78fbf59..3755dc4 100644 --- a/comictaggerlib/options.py +++ b/comictaggerlib/options.py @@ -303,7 +303,11 @@ For more help visit the wiki at: http://code.google.com/p/comictagger/ # Determine if the entry point exists before trying to run it if "main" in dir(script): - script.main() + try: + script.main() + except Exception as e: + print "Script raised an unhandled exception!" + print e, sys.exc_info()[0] else: print "Can't find entry point \"main()\" in module \"{0}\"".format( module_name ) sys.exit(0)