src: wireviz: log if adding additional bom item failed

This commit is contained in:
Laurier Loiselle 2023-01-19 16:23:44 -05:00
parent 1faaff078a
commit 13d34887b2
No known key found for this signature in database
GPG Key ID: 345920CC72089A3F

View File

@ -1,6 +1,7 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import logging
import sys
from pathlib import Path
from typing import Any, Dict, List, Tuple, Union
@ -366,7 +367,11 @@ def parse(
if "additional_bom_items" in yaml_data:
for line in yaml_data["additional_bom_items"]:
harness.add_additional_bom_item(line)
try:
harness.add_additional_bom_item(line)
except TypeError as e:
logging.error(f"Failed to add line {line} as an additional bom item")
raise
# harness population completed =============================================