Changeset 3089 for coopr.pysp/trunk/coopr/pysp/ef_writer_script.py
- Timestamp:
- Oct 13, 2010 1:57:45 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
coopr.pysp/trunk/coopr/pysp/ef_writer_script.py
r2990 r3089 134 134 dest="disable_gc", 135 135 default=False) 136 parser.add_option('--traceback', 137 help="When an exception is thrown, show the entire call stack. Ignored if profiling is enabled. Default is False.", 138 action="store_true", 139 dest="traceback", 140 default=False) 136 141 parser.usage=usage_string 137 142 … … 261 266 # Call the main EF writer without profiling. 262 267 # 263 ans = run_ef_writer(options, args) 268 if options.traceback is True: 269 ans = run_ef_writer(options, args) 270 else: 271 try: 272 ans = run_ef_writer(options, args) 273 except ValueError, str: 274 print "VALUE ERROR:" 275 print str 276 except TypeError, str: 277 print "TYPE ERROR:" 278 print str 279 except NameError, str: 280 print "NAME ERROR:" 281 print str 282 except IOError, str: 283 print "IO ERROR:" 284 print str 285 except pyutilib.common.ApplicationError, str: 286 print "APPLICATION ERROR:" 287 print str 288 except RuntimeError, str: 289 print "RUN-TIME ERROR:" 290 print str 291 except: 292 print "Encountered unhandled exception" 293 traceback.print_exc() 294 sys.exit(0) 264 295 265 296 gc.enable()
Note: See TracChangeset
for help on using the changeset viewer.