LSST Applications g07dc498a13+cb17356775,g1409bbee79+cb17356775,g1a7e361dbc+cb17356775,g1fd858c14a+d1a2a640a9,g33399d78f5+fe6948661d,g35bb328faa+e55fef2c71,g3bd4b5ce2c+cac9e18807,g3c79e8cd92+2359a18b76,g43bc871e57+a58ba40925,g53246c7159+e55fef2c71,g60b5630c4e+8133a3545f,g78460c75b0+8427c4cc8f,g78619a8342+55305cb8f0,g786e29fd12+307f82e6af,g8534526c7b+8e1c6b434f,g89139ef638+cb17356775,g8b49a6ea8e+8133a3545f,g8ffcb69f3d+818ab6c36e,g9125e01d80+e55fef2c71,g97b8272a79+98425f45f6,g989de1cb63+cb17356775,g9f33ca652e+4245ceb508,gaaedd4e678+cb17356775,gabe3b4be73+9c0c3c7524,gb1101e3267+3e5ef1d639,gb58c049af0+28045f66fd,gc1fe0db326+8133a3545f,gca43fec769+e55fef2c71,gcf25f946ba+fe6948661d,gd397e13551+64039f84ea,gd6cbbdb0b4+f6e5445f66,gde0f65d7ad+7eb368c542,ge278dab8ac+b4c2c8faf7,geab183fbe5+8133a3545f,gecb8035dfe+1f480bec5e,gefa07fa684+e7bc33f3ea,gf58bf46354+e55fef2c71,gfe7187db8c+e55afb4430,w.2025.03
LSST Data Management Base Package
Loading...
Searching...
No Matches
lsst.pex.config.config.FieldValidationError Class Reference
Inheritance diagram for lsst.pex.config.config.FieldValidationError:

Public Member Functions

 __init__ (self, field, config, msg)
 

Public Attributes

 fieldType
 
 fieldName
 
 fullname
 
 history
 
 fieldSource
 
 configSource
 

Detailed Description

Raised when a ``~lsst.pex.config.Field`` is not valid in a
particular ``~lsst.pex.config.Config``.

Parameters
----------
field : `lsst.pex.config.Field`
    The field that was not valid.
config : `lsst.pex.config.Config`
    The config containing the invalid field.
msg : `str`
    Text describing why the field was not valid.

Definition at line 247 of file config.py.

Constructor & Destructor Documentation

◆ __init__()

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

Definition at line 261 of file config.py.

261 def __init__(self, field, config, msg):
262 self.fieldType = type(field)
263 """Type of the `~lsst.pex.config.Field` that incurred the error.
264 """
265
266 self.fieldName = field.name
267 """Name of the `~lsst.pex.config.Field` instance that incurred the
268 error (`str`).
269
270 See also
271 --------
272 lsst.pex.config.Field.name
273 """
274
275 self.fullname = _joinNamePath(config._name, field.name)
276 """Fully-qualified name of the `~lsst.pex.config.Field` instance
277 (`str`).
278 """
279
280 self.history = config.history.setdefault(field.name, [])
281 """Full history of all changes to the `~lsst.pex.config.Field`
282 instance.
283 """
284
285 self.fieldSource = field.source
286 """File and line number of the `~lsst.pex.config.Field` definition.
287 """
288
289 self.configSource = config._source
290 error = (
291 f"{self.fieldType.__name__} '{self.fullname}' failed validation: {msg}\n"
292 f"For more information see the Field definition at:\n{self.fieldSource.format()}"
293 f" and the Config definition at:\n{self.configSource.format()}"
294 )
295 super().__init__(error)
296
297

Member Data Documentation

◆ configSource

lsst.pex.config.config.FieldValidationError.configSource

Definition at line 289 of file config.py.

◆ fieldName

lsst.pex.config.config.FieldValidationError.fieldName

Definition at line 266 of file config.py.

◆ fieldSource

lsst.pex.config.config.FieldValidationError.fieldSource

Definition at line 285 of file config.py.

◆ fieldType

lsst.pex.config.config.FieldValidationError.fieldType

Definition at line 262 of file config.py.

◆ fullname

lsst.pex.config.config.FieldValidationError.fullname

Definition at line 275 of file config.py.

◆ history

lsst.pex.config.config.FieldValidationError.history

Definition at line 280 of file config.py.


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