Changeset 3026


Ignore:
Timestamp:
Sep 19, 2010 10:15:25 PM (11 years ago)
Author:
wehart
Message:

Adding error handling when 'using' option specifies a bad value.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • coopr.pyomo/trunk/coopr/pyomo/data/process_data.py

    r3025 r3026  
    1717from coopr.pyomo.base import pyomo
    1818from coopr.pyomo.base.plugin import *
     19import pyutilib.common
    1920
    2021global Lineno
     
    535536        tmp = options.filename.split(".")[-1]
    536537        data = DataManagerFactory(tmp)
     538        if data is None:
     539            raise pyutilib.common.ApplicationError, "Cannot create data manager '%s'" % tmp
    537540    else:
    538541        data = DataManagerFactory(options.using)
     542        if data is None:
     543            raise pyutilib.common.ApplicationError, "Cannot create data manager '%s'" % options.using
    539544    set_name=None
    540545    param_name=None
Note: See TracChangeset for help on using the changeset viewer.