schema_salad.exceptions
=======================

.. py:module:: schema_salad.exceptions

.. autoapi-nested-parse::

   Shared Exception classes.



Exceptions
----------

.. autoapisummary::

   schema_salad.exceptions.SchemaSaladException
   schema_salad.exceptions.SchemaException
   schema_salad.exceptions.ValidationException
   schema_salad.exceptions.ClassValidationException


Functions
---------

.. autoapisummary::

   schema_salad.exceptions.to_one_line_messages


Module Contents
---------------

.. py:exception:: SchemaSaladException(msg, sl = None, children = None, bullet_for_children = '', detailed_message = None)

   Bases: :py:obj:`Exception`

   .. autoapi-inheritance-diagram:: schema_salad.exceptions.SchemaSaladException
      :parts: 1


   Base class for all schema-salad exceptions.


   .. py:attribute:: message


   .. py:attribute:: detailed_message


   .. py:attribute:: file
      :type:  Optional[str]
      :value: None



   .. py:attribute:: start
      :type:  Optional[tuple[int, int]]
      :value: None



   .. py:attribute:: end
      :type:  Optional[tuple[int, int]]
      :value: None



   .. py:attribute:: is_warning
      :type:  bool
      :value: False



   .. py:attribute:: bullet
      :type:  str
      :value: ''



   .. py:method:: propagate_sourceline()


   .. py:method:: as_warning()


   .. py:method:: with_sourceline(sl)


   .. py:method:: leaves()

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



   .. py:method:: prefix()


   .. py:method:: summary(level = 0, with_bullet = False)


   .. py:method:: __str__()

      Convert to a string using :py:meth:`pretty_str`.



   .. py:method:: pretty_str(level = 0)


.. py:exception:: SchemaException(msg, sl = None, children = None, bullet_for_children = '', detailed_message = None)

   Bases: :py:obj:`SchemaSaladException`

   .. autoapi-inheritance-diagram:: schema_salad.exceptions.SchemaException
      :parts: 1


   Indicates error with the provided schema definition.


.. py:exception:: ValidationException(msg, sl = None, children = None, bullet_for_children = '', detailed_message = None)

   Bases: :py:obj:`SchemaSaladException`

   .. autoapi-inheritance-diagram:: schema_salad.exceptions.ValidationException
      :parts: 1


   Indicates error with document against the provided schema.


.. py:exception:: ClassValidationException(msg, sl = None, children = None, bullet_for_children = '', detailed_message = None)

   Bases: :py:obj:`ValidationException`

   .. autoapi-inheritance-diagram:: schema_salad.exceptions.ClassValidationException
      :parts: 1


   Indicates error with document against the provided schema.


.. py:function:: to_one_line_messages(exc)

