:py:mod:`cyclonedx.exception.serialization`
===========================================

.. py:module:: cyclonedx.exception.serialization

.. autoapi-nested-parse::

   Exceptions relating to specific conditions that occur when (de)serializing/(de)normalizing CycloneDX BOM.



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

.. py:exception:: CycloneDxSerializationException


   Bases: :py:obj:`cyclonedx.exception.CycloneDxException`

   Base exception that covers all exceptions that may be thrown during model serializing/normalizing.

   .. py:class:: args



   .. py:method:: add_note()

      Exception.add_note(note) --
      add a note to the exception


   .. py:method:: with_traceback()

      Exception.with_traceback(tb) --
      set self.__traceback__ to tb and return self.



.. py:exception:: CycloneDxDeserializationException


   Bases: :py:obj:`cyclonedx.exception.CycloneDxException`

   Base exception that covers all exceptions that may be thrown during model deserializing/denormalizing.

   .. py:class:: args



   .. py:method:: add_note()

      Exception.add_note(note) --
      add a note to the exception


   .. py:method:: with_traceback()

      Exception.with_traceback(tb) --
      set self.__traceback__ to tb and return self.



.. py:exception:: SerializationOfUnsupportedComponentTypeException


   Bases: :py:obj:`CycloneDxSerializationException`

   Raised when attempting serializing/normalizing a :py:class:`cyclonedx.model.component.Component`
   to a :py:class:`cyclonedx.schema.schema.BaseSchemaVersion`
   which does not support that :py:class:`cyclonedx.model.component.ComponentType`
   .

   .. py:class:: args



   .. py:method:: add_note()

      Exception.add_note(note) --
      add a note to the exception


   .. py:method:: with_traceback()

      Exception.with_traceback(tb) --
      set self.__traceback__ to tb and return self.



.. py:exception:: SerializationOfUnexpectedValueException


   Bases: :py:obj:`CycloneDxSerializationException`, :py:obj:`ValueError`

   Raised when attempting serializing/normalizing a type that is not expected there.

   .. py:class:: args



   .. py:method:: add_note()

      Exception.add_note(note) --
      add a note to the exception


   .. py:method:: with_traceback()

      Exception.with_traceback(tb) --
      set self.__traceback__ to tb and return self.



