summaryrefslogtreecommitdiffstats
path: root/rtemsspec/items.py
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2021-01-22 06:53:54 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2021-01-22 06:53:54 +0100
commit6f5da2219555276e8641a4418746e6c513186ce9 (patch)
tree938c26b06c618d0ba7c8983c4abfb12476cd1d3e /rtemsspec/items.py
parentitems: Improve identifier to item error message (diff)
downloadrtems-central-6f5da2219555276e8641a4418746e6c513186ce9.tar.bz2
items: Improve identifier to value error message
Diffstat (limited to 'rtemsspec/items.py')
-rw-r--r--rtemsspec/items.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/rtemsspec/items.py b/rtemsspec/items.py
index bcc7ed0a..666f6311 100644
--- a/rtemsspec/items.py
+++ b/rtemsspec/items.py
@@ -515,8 +515,13 @@ class ItemMapper:
f"specified by '{identifier}' does not exist")
raise ValueError(msg) from err
key_path = normalize_key_path(key_path, prefix)
- value = item.get_by_normalized_key_path(key_path,
- self.get_value_map(item))
+ try:
+ value = item.get_by_normalized_key_path(key_path,
+ self.get_value_map(item))
+ except Exception as err:
+ msg = (f"cannot get value for '{key_path}' of {item.spec} "
+ f"specified by '{identifier}'")
+ raise ValueError(msg) from err
for func in pipes:
value = getattr(self, func)(value)
return item, key_path, value