MCPcopy Create free account
hub / github.com/sissaschool/xmlschema / encode_error

Method encode_error

xmlschema/validators/validation.py:400–415  ·  view source on GitHub ↗
(self,
                     validation: str,
                     validator: 'XsdValidator',
                     obj: Any,
                     encoder: Any,
                     error: Union[str, Exception])

Source from the content-addressed store, hash-verified

398 super().__init__(source, converter, **kwargs)
399
400 def encode_error(self,
401 validation: str,
402 validator: 'XsdValidator',
403 obj: Any,
404 encoder: Any,
405 error: Union[str, Exception]) -> XMLSchemaValidationError:
406
407 error = XMLSchemaEncodeError(
408 validator=validator,
409 obj=obj,
410 encoder=encoder,
411 reason=str(error),
412 source=self.source,
413 namespaces=self.namespaces,
414 )
415 return self.raise_or_collect(validation, error)
416
417 def create_element(self, tag: str) -> ElementType:
418 """

Callers 2

raw_encodeMethod · 0.80
raw_encodeMethod · 0.80

Calls 2

raise_or_collectMethod · 0.80

Tested by

no test coverage detected