schema_salad.exceptions
Shared Exception classes.
Exceptions
Base class for all schema-salad exceptions. |
|
Indicates error with the provided schema definition. |
|
Indicates error with document against the provided schema. |
|
Indicates error with document against the provided schema. |
Functions
|
Module Contents
- exception schema_salad.exceptions.SchemaSaladException(msg, sl=None, children=None, bullet_for_children='', detailed_message=None)
Bases:
Exception
Base class for all schema-salad exceptions.
- Parameters:
msg (str)
sl (schema_salad.sourceline.SourceLine | None)
children (collections.abc.Sequence[SchemaSaladException] | None)
bullet_for_children (str)
detailed_message (str | None)
- message: Final
- detailed_message: Final = None
- propagate_sourceline()
- Return type:
None
- as_warning()
- Return type:
- with_sourceline(sl)
Use the provided SourceLine to set the causal location.
- Parameters:
sl (schema_salad.sourceline.SourceLine | None)
- Return type:
- leaves()
Return the list of all the exceptions at the tips of the tree.
- Return type:
- __str__()
Convert to a string using
pretty_str().- Return type:
- exception schema_salad.exceptions.SchemaException(msg, sl=None, children=None, bullet_for_children='', detailed_message=None)
Bases:
SchemaSaladException
Indicates error with the provided schema definition.
- Parameters:
msg (str)
sl (schema_salad.sourceline.SourceLine | None)
children (collections.abc.Sequence[SchemaSaladException] | None)
bullet_for_children (str)
detailed_message (str | None)
- exception schema_salad.exceptions.ValidationException(msg, sl=None, children=None, bullet_for_children='', detailed_message=None)
Bases:
SchemaSaladException
Indicates error with document against the provided schema.
- Parameters:
msg (str)
sl (schema_salad.sourceline.SourceLine | None)
children (collections.abc.Sequence[SchemaSaladException] | None)
bullet_for_children (str)
detailed_message (str | None)
- exception schema_salad.exceptions.ClassValidationException(msg, sl=None, children=None, bullet_for_children='', detailed_message=None)
Bases:
ValidationException
Indicates error with document against the provided schema.
- Parameters:
msg (str)
sl (schema_salad.sourceline.SourceLine | None)
children (collections.abc.Sequence[SchemaSaladException] | None)
bullet_for_children (str)
detailed_message (str | None)
- schema_salad.exceptions.to_one_line_messages(exc)
- Parameters:
exc (SchemaSaladException)
- Return type: