LSSTApplications  10.0+286,10.0+36,10.0+46,10.0-2-g4f67435,10.1+152,10.1+37,11.0,11.0+1,11.0-1-g47edd16,11.0-1-g60db491,11.0-1-g7418c06,11.0-2-g04d2804,11.0-2-g68503cd,11.0-2-g818369d,11.0-2-gb8b8ce7
LSSTDataManagementBasePackage
Public Member Functions | Public Attributes | List of all members
lsst.pex.config.config.FieldValidationError Class Reference
Inheritance diagram for lsst.pex.config.config.FieldValidationError:

Public Member Functions

def __init__
 

Public Attributes

 fieldType
 
 fieldName
 
 fullname
 
 history
 
 fieldSource
 
 configSource
 

Detailed Description

Custom exception class which holds additional information useful to
debuggin Config errors:
- fieldType: type of the Field which incurred the error
- fieldName: name of the Field which incurred the error
- fullname: fully qualified name of the Field instance
- history: full history of all changes to the Field instance
- fieldSource: file and line number of the Field definition   

Definition at line 110 of file config.py.

Constructor & Destructor Documentation

def lsst.pex.config.config.FieldValidationError.__init__ (   self,
  field,
  config,
  msg 
)

Definition at line 120 of file config.py.

121  def __init__(self, field, config, msg):
122  self.fieldType = type(field)
123  self.fieldName = field.name
124  self.fullname = _joinNamePath(config._name, field.name)
125  self.history = config.history.setdefault(field.name, [])
126  self.fieldSource = field.source
127  self.configSource = config._source
128  error="%s '%s' failed validation: %s\n"\
129  "For more information read the Field definition at:\n%s"\
130  "And the Config definition at:\n%s"%\
131  (self.fieldType.__name__, self.fullname, msg,
132  traceback.format_list([self.fieldSource])[0],
133  traceback.format_list([self.configSource])[0])
134  ValueError.__init__(self, error)
135 

Member Data Documentation

lsst.pex.config.config.FieldValidationError.configSource

Definition at line 126 of file config.py.

lsst.pex.config.config.FieldValidationError.fieldName

Definition at line 122 of file config.py.

lsst.pex.config.config.FieldValidationError.fieldSource

Definition at line 125 of file config.py.

lsst.pex.config.config.FieldValidationError.fieldType

Definition at line 121 of file config.py.

lsst.pex.config.config.FieldValidationError.fullname

Definition at line 123 of file config.py.

lsst.pex.config.config.FieldValidationError.history

Definition at line 124 of file config.py.


The documentation for this class was generated from the following file: