From 0e164bb23c569e3133d13ac92f9d6e6da0ebd2ae Mon Sep 17 00:00:00 2001 From: Andrew Dennison Date: Sun, 5 Sep 2021 10:29:15 +1000 Subject: [PATCH] build/generic_platform: include identifier in ValueError * show which identifier is incorrectly specified --- litex/build/generic_platform.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/litex/build/generic_platform.py b/litex/build/generic_platform.py index 6d95d5ff3..96fe8bc8e 100644 --- a/litex/build/generic_platform.py +++ b/litex/build/generic_platform.py @@ -155,7 +155,10 @@ class ConnectorManager: r = [] for identifier in identifiers: if ":" in identifier: - conn, pn = identifier.split(":") + try: + conn, pn = identifier.split(":") + except ValueError as err: + raise ValueError(f"\"{identifier}\" {err}") from err if pn.isdigit(): pn = int(pn)