fixed project sturcture, fixes imports

This commit is contained in:
2024-01-24 15:48:07 +01:00
parent 718015c7d4
commit ee5d585f01
17 changed files with 296 additions and 204 deletions

View File

@@ -0,0 +1,3 @@
from .undefined_communication_method_error import UndefinedCommunicationMethodError
from .value_out_of_bounds_error import ValueOutOfBoundsError
from .undefined_value_error import UndefinedValueError

View File

@@ -0,0 +1,5 @@
class UndefinedCommunicationMethodError(Exception):
def __init__(self, port: str):
method = port.split( "::" )[0]
super().__init__( f"ERROR: Undefined Communication Exception, Method \"{method}\" is not recognized in Port \"{port}\"." )

View File

@@ -0,0 +1,4 @@
class UndefinedValueError(Exception):
def __init__(self, value: str, expected: str):
super().__init__( f"ERROR: Undefined Value, expected: {expected}, value: {value}." )

View File

@@ -0,0 +1,4 @@
class ValueOutOfBoundsError(Exception):
def __init__(self, bounds: tuple[float, float] | tuple[int, int], value: float | int):
super().__init__( f"ERROR: Value out of expected bounds, Min: {bounds[0]}, Max: {bounds[1]}, Value: {value}." )