wrapped a try-catch around script execution
git-svn-id: http://comictagger.googlecode.com/svn/trunk@509 6c5673fe-1810-88d6-992b-cd32ca31540c
This commit is contained in:
parent
464e147223
commit
a61972e503
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user