Raised when there is an improper usage attempt of a not built XSD validator. :param validator: the XSD validator. :param message: the error message. :param namespaces: is an optional mapping from namespace prefix to URI.
| 211 | |
| 212 | |
| 213 | class XMLSchemaNotBuiltError(XMLSchemaValidatorError, RuntimeError): |
| 214 | """ |
| 215 | Raised when there is an improper usage attempt of a not built XSD validator. |
| 216 | |
| 217 | :param validator: the XSD validator. |
| 218 | :param message: the error message. |
| 219 | :param namespaces: is an optional mapping from namespace prefix to URI. |
| 220 | """ |
| 221 | def __init__(self, validator: 'XsdValidator', |
| 222 | message: str, |
| 223 | namespaces: Optional[NsmapType] = None) -> None: |
| 224 | if namespaces is None: |
| 225 | namespaces = getattr(validator, 'namespaces', None) |
| 226 | super().__init__( |
| 227 | validator=validator, |
| 228 | message=message, |
| 229 | elem=getattr(validator, 'elem', None), |
| 230 | source=getattr(validator, 'source', None), |
| 231 | namespaces=namespaces |
| 232 | ) |
| 233 | |
| 234 | |
| 235 | class XMLSchemaParseError(XMLSchemaValidatorError, SyntaxError): |
no outgoing calls
searching dependent graphs…