uds.utilities.custom_exceptions

Custom exception that are used within the project.

Module Contents

exception uds.utilities.custom_exceptions.ReassignmentError[source]

Bases: Exception

Inheritance diagram of uds.utilities.custom_exceptions.ReassignmentError

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.

exception uds.utilities.custom_exceptions.InconsistentArgumentsError[source]

Bases: ValueError

Inheritance diagram of uds.utilities.custom_exceptions.InconsistentArgumentsError

Provided arguments values are not compatible with each other.

Example:

A function takes two parameters: a, b

Let’s assume that the function requires that: a > b

The function would raise InconsistentArgumentsError 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.

exception uds.utilities.custom_exceptions.UnusedArgumentError[source]

Bases: ValueError

Inheritance diagram of uds.utilities.custom_exceptions.UnusedArgumentError

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.

exception uds.utilities.custom_exceptions.AmbiguityError[source]

Bases: ValueError

Inheritance diagram of uds.utilities.custom_exceptions.AmbiguityError

Operation cannot be executed because it is ambiguous.

Initialize self. See help(type(self)) for accurate signature.