# schema_salad.exceptions

Shared Exception classes.

## Exceptions

`SchemaSaladException` | Base class for all schema-salad exceptions.
`SchemaException` | Indicates error with the provided schema definition.
`ValidationException` | Indicates error with document against the provided schema.
`ClassValidationException` | Indicates error with document against the provided schema.

## Functions

`to_one_line_messages`(exc) |

## 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
  file: str | None = None
  start: tuple[int, int] | None = None
  end: tuple[int, int] | None = None
  is_warning: bool = False
  bullet: str = ''
  propagate_sourceline()
    Return type:

      None

  as_warning()
    Return type:

      SchemaSaladException

  with_sourceline(sl)
    Parameters:

      sl (Optional[schema_salad.sourceline.SourceLine])

    Return type:

      SchemaSaladException

  leaves()

    Return the list of all the exceptions at the tips of the tree.

    Return type:

      list[SchemaSaladException]

  prefix()
    Return type:

      str

  summary(level=0, with_bullet=False)
    Parameters:

      - level (int)

      - with_bullet (bool)

    Return type:

      str

  __str__()

    Convert to a string using `pretty_str()`.

    Return type:

      str

  pretty_str(level=0)
    Parameters:

      level (int)

    Return type:

      str

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:

    str