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 (Optional[schema_salad.sourceline.SourceLine])
children (Optional[collections.abc.Sequence[SchemaSaladException]])
bullet_for_children (str)
detailed_message (Optional[str])
- message
- detailed_message
- propagate_sourceline()
- Return type:
None
- as_warning()
- Return type:
- with_sourceline(sl)
- Parameters:
sl (Optional[schema_salad.sourceline.SourceLine])
- 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 (Optional[schema_salad.sourceline.SourceLine])
children (Optional[collections.abc.Sequence[SchemaSaladException]])
bullet_for_children (str)
detailed_message (Optional[str])
- 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 (Optional[schema_salad.sourceline.SourceLine])
children (Optional[collections.abc.Sequence[SchemaSaladException]])
bullet_for_children (str)
detailed_message (Optional[str])
- 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 (Optional[schema_salad.sourceline.SourceLine])
children (Optional[collections.abc.Sequence[SchemaSaladException]])
bullet_for_children (str)
detailed_message (Optional[str])
- schema_salad.exceptions.to_one_line_messages(exc)
- Parameters:
exc (SchemaSaladException)
- Return type: