Skip to content

Commit

Permalink
Improve error handling for task watchdog list
Browse files Browse the repository at this point in the history
  • Loading branch information
dinkelk committed Aug 29, 2024
1 parent 0a48c43 commit ab260fc
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/components/task_watchdog/gen/models/task_watchdog_list.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,8 +190,16 @@ def _resolve_pet_connectors(self):
)
# Resolve all pet connector component ids:
for pet_info in self.watchdog_list.values():
pet_info.connector_id = connected_components[pet_info.connector_name]
self.watchdog_list[pet_info.connector_name] = pet_info
try:
pet_info.connector_id = connected_components[pet_info.connector_name]
self.watchdog_list[pet_info.connector_name] = pet_info
except KeyError:
raise ModelException(
"Task_Watchdog Lists specifies connector name: "
+ str(pet_info.connector_name)
+ " which does not exist in the assembly."
)


# Sort the watchdog list by index:
self.watchdog_list = OrderedDict(
Expand Down

0 comments on commit ab260fc

Please sign in to comment.