Changeset 3032


Ignore:
Timestamp:
Sep 20, 2010 6:37:42 PM (11 years ago)
Author:
jwatson
Message:

Adding error-handling logic (pretty exception trapping/output) to PySP computeconf script.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • coopr.pysp/trunk/scripts/computeconf

    r3031 r3032  
    400400#
    401401
    402 run()
     402try:
     403   run()
     404except ValueError, str:
     405    print "VALUE ERROR:"
     406    print str
     407except IOError, str:
     408    print "IO ERROR:"
     409    print str
     410except pyutilib.common.ApplicationError, str:
     411    print "APPLICATION ERROR:"
     412    print str
     413except RuntimeError, str:
     414    print "RUN-TIME ERROR:"   
     415    print str       
     416except:
     417   print "Encountered unhandled exception"
     418   traceback.print_exc()   
Note: See TracChangeset for help on using the changeset viewer.