uds.utilities.custom_exceptions =============================== .. py:module:: uds.utilities.custom_exceptions .. autoapi-nested-parse:: Custom exception that are used within the project. Exceptions ---------- .. autoapisummary:: uds.utilities.custom_exceptions.ReassignmentError uds.utilities.custom_exceptions.InconsistencyError uds.utilities.custom_exceptions.UnusedArgumentError uds.utilities.custom_exceptions.AmbiguityError uds.utilities.custom_exceptions.MessageTransmissionNotStartedError Module Contents --------------- .. py:exception:: ReassignmentError Bases: :py:obj:`Exception` .. autoapi-inheritance-diagram:: uds.utilities.custom_exceptions.ReassignmentError :parts: 1 :private-bases: An attempt to set a new value to an unchangeable attribute. Example: Objects of class X are initialized with an attribute const_x that must not be changed after the object creation (outside __init__ method). ReassignmentError would be raised when a user tries to change the value of const_x attribute after the object is initialized. Initialize self. See help(type(self)) for accurate signature. .. py:exception:: InconsistencyError Bases: :py:obj:`ValueError` .. autoapi-inheritance-diagram:: uds.utilities.custom_exceptions.InconsistencyError :parts: 1 :private-bases: An attempt to set a value that cannot be used with other provided or already set value. Example: A function takes two parameters: `a`, `b` Let's assume that the function requires that: `a > b` The function would raise InconsistencyError when values of `a` and `b` are not satisfying the requirement (`a > b`), e.g. `a = 0`, `b = 1`. Initialize self. See help(type(self)) for accurate signature. .. py:exception:: UnusedArgumentError Bases: :py:obj:`ValueError` .. autoapi-inheritance-diagram:: uds.utilities.custom_exceptions.UnusedArgumentError :parts: 1 :private-bases: At least one argument (that was provided by user) will be ignored. Example: A function takes two parameters: a, b Let's assume that parameter `a` must always be provided. Parameter `b` is used only when `a == 1`. The function would raise this exception when both parameters are provided but `a != 1`. Initialize self. See help(type(self)) for accurate signature. .. py:exception:: AmbiguityError Bases: :py:obj:`ValueError` .. autoapi-inheritance-diagram:: uds.utilities.custom_exceptions.AmbiguityError :parts: 1 :private-bases: Operation cannot be executed because it is ambiguous. Initialize self. See help(type(self)) for accurate signature. .. py:exception:: MessageTransmissionNotStartedError Bases: :py:obj:`TimeoutError` .. autoapi-inheritance-diagram:: uds.utilities.custom_exceptions.MessageTransmissionNotStartedError :parts: 1 :private-bases: Timeout Error where a timeout was reached before message transmission has been started. Example: Timeout defined by `start_timeout` argument was reached by :meth:`~uds.transport_interface.abstract_transport_interface.AbstractTransportInterface.receive_message` Initialize self. See help(type(self)) for accurate signature.