Improve error messages in interface/zone_controller

Change-Id: I7a565e9a622deb23b08d3b401c75d5a14e821254
This commit is contained in:
Henrik Wahlqvist 2024-12-18 17:05:11 +01:00
parent 5bcd3a152f
commit c41611432e
2 changed files with 9 additions and 6 deletions
NOTICE
powertrain_build/interface

6
NOTICE

@ -34,8 +34,8 @@ ruamel-yaml 0.18.6: https://pypi.org/project/ruamel.yaml/ : MIT License
ruamel.yaml.clib 0.2.12: https://sourceforge.net/p/ruamel-yaml-clib/code/ci/default/tree/ : MIT License
SciPy 1.9.1: http://www.scipy.org : BSD 3-clause "New" or "Revised" License
smmap 5.0.1: https://github.com/gitpython-developers/smmap : BSD 3-clause "New" or "Revised" License
tomli 2.2.1: https://github.com/hukkin/tomli : (MIT License OR Unknown License)
urllib3 2.2.3 : MIT License
tomli 2.2.1: https://github.com/hukkin/tomli : MIT License
urllib3 2.2.3: https://urllib3.readthedocs.io/en/stable : MIT License
voluptuous 0.15.2: http://pypi.python.org/pypi/voluptuous : BSD 3-clause "New" or "Revised" License
Copyright Text:
@ -13563,7 +13563,7 @@ tomli 2.2.1 pypi:tomli/2.2.1: https://github.com/hukkin/tomli
Copyright (c) 2021 Taneli Hukkinen
urllib3 2.2.3 pypi:urllib3/2.2.3
urllib3 2.2.3 pypi:urllib3/2.2.3: https://urllib3.readthedocs.io/en/stable
Copyright (c) 2008-2020 Andrey Petrov and contributors.
copyright = f"

@ -186,7 +186,7 @@ class ZCAL(BaseApplication):
elif "outsignal" in element:
temp_dir = "OUT"
else:
raise BadYamlFormat(f"in/out signal for element in { element_name } is missing.")
raise BadYamlFormat(f"in-/out-signal for element in { element_name } is missing.")
if direction != temp_dir:
raise BadYamlFormat(f"Signal { element_name } has both in and out elements.")
if element.get("updateBit", False):
@ -214,7 +214,7 @@ class ZCAL(BaseApplication):
signal_name = signal_definition["outsignal"]
base_signals = self.base_application.outsignals
else:
raise BadYamlFormat(f"in/out signal for { signal_name } is missing.")
raise BadYamlFormat(f"{ signal_name } is neither insignal nor outsignal in interface yaml file.")
base_properties = None
for base_signal in base_signals:
if signal_name == base_signal.name:
@ -223,7 +223,10 @@ class ZCAL(BaseApplication):
matching_base_signal
)
if base_properties is None:
raise BadYamlFormat(f"in/out signal for { signal_name } is missing.")
raise BadYamlFormat(
f"{ signal_name } properties is missing. "
"Make sure that the model is in the raster file and that it is active in the current project."
)
if base_properties["type"] in enumerations:
if 'init' in signal_definition: