Package pyxb :: Module exceptions_ :: Class OrphanElementContentError
[hide private]
[frames] | no frames]

Class OrphanElementContentError

source code

              object --+                        
                       |                        
exceptions.BaseException --+                    
                           |                    
        exceptions.Exception --+                
                               |                
                   PyXBException --+            
                                   |            
                     ValidationError --+        
                                       |        
              ComplexTypeValidationError --+    
                                           |    
                      ContentValidationError --+
                                               |
                                              OrphanElementContentError

An element expected to be used in content is not present in the instance.

This exception occurs in batch-mode validation when pyxb.ValidationConfig.contentInfluencesGeneration applies, pyxb.ValidationConfig.orphanElementInContent is set to pyxb.ValidationConfig.RAISE_EXCEPTION, and the content list includes an element that is not in the binding instance content.

Instance Methods [hide private]
 
__init__(self, instance, preferred)
Create an exception indicating a PyXB-related problem.
source code
 
__unicode__(self) source code
 
__str__(self)
str(x)
source code

Inherited from ValidationError: details

Inherited from PyXBException (private): _str_from_unicode

Inherited from exceptions.Exception: __new__

Inherited from exceptions.BaseException: __delattr__, __getattribute__, __getitem__, __getslice__, __reduce__, __repr__, __setattr__, __setstate__

Inherited from object: __format__, __hash__, __reduce_ex__, __sizeof__, __subclasshook__

Class Variables [hide private]
  instance = None
The binding instance.
  preferred = None
An element value from the instance content list which was not found in the instance.

Inherited from ValidationError: location

Inherited from PyXBException (private): _args, _kw

Properties [hide private]

Inherited from exceptions.BaseException: args, message

Inherited from object: __class__

Method Details [hide private]

__init__(self, instance, preferred)
(Constructor)

source code 

Create an exception indicating a PyXB-related problem.

If no args are present, a default argument is taken from the message keyword.

Parameters:
  • instance - the value for the instance attribute.
  • preferred - the value for the preferred attribute.
Overrides: object.__init__

__unicode__(self)

source code 
Overrides: exceptions.BaseException.__unicode__

__str__(self)
(Informal representation operator)

source code 

str(x)

Overrides: object.__str__
(inherited documentation)