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

# type ValidationError

source code

                  object --+
                           |
    exceptions.BaseException --+
                               |
            exceptions.Exception --+
                                   |
                       PyXBException --+
                                       |
                                      ValidationError

Known Subclasses:
  - ElementValidationError
  - , ComplexTypeValidationError
  - , AttributeValidationError
  - , NonElementValidationError
  - , SimpleTypeValueError

Raised when something in the infoset fails to satisfy a content model or attribute requirement.

All validation errors include a location attribute which shows where in the original XML the problem occurred. The attribute may be `None` if the content did not come from an XML document, or the underlying XML infrastructure did not provide a location.

More refined validation error exception classes add more attributes.

Instance Methods | [hide private]
details(self) Provide information describing why validation failed. | source code
Inherited from `PyXBException`: `__init__` Inherited from `PyXBException` (private): `_str_from_unicode` Inherited from `exceptions.Exception`: `__new__` Inherited from `exceptions.BaseException`: `__delattr__`, `__getattribute__`, `__getitem__`, `__getslice__`, `__reduce__`, `__repr__`, `__setattr__`, `__setstate__`, `__str__`, `__unicode__`

Class Variables | [hide private]
| location = `None` Where the error occurred in the document being parsed, if available.
Inherited from `PyXBException` (private): `_args`, `_kw`

Properties | [hide private]
Inherited from `exceptions.BaseException`: `args`, `message`

Method Details | [hide private]

### details(self) | source code
Provide information describing why validation failed. In many cases, this is simply the informal string content that would be obtained through the `str` built-in function. For certain errors this method gives more details on what would be acceptable and where the descriptions can be found in the original schema. Returns: a string description of validation failure

Class Variable Details | [hide private]

  ### location Where the error occurred in the document being parsed, if available. This will be `None`, or an instance of pyxb.utils.utility.Location. Value:
      None