Throw exception if in verbose mode

pull/160/head
Emilio Monti 2014-02-07 12:06:48 +00:00
parent f597baf35b
commit acdd9db330
1 changed files with 5 additions and 1 deletions

View File

@ -190,4 +190,8 @@ if __name__ == '__main__':
except KeyboardInterrupt, e:
print "\n[CTRL+c] exit"
except Exception,e:
print "[ERROR] %s" % str(e)
if options.verbose:
import traceback
traceback.print_exc(file=sys.stdout)
else:
print "[ERROR] %s" % str(e)