[remote_base] List the valid protocol names in the request_protocol error

This commit is contained in:
J. Nick Koston
2026-09-11 06:42:47 -05:00
parent 22b88781e6
commit 2526937271
+3 -1
View File
@@ -145,7 +145,9 @@ _PROTOCOL_STEMS = sorted(
def request_protocol(name: str) -> None:
"""Keep a protocol's source file in the build; components using it from C++ must call this."""
if _protocol_stem(name) not in _PROTOCOL_STEMS:
raise ValueError(f"Unknown remote protocol {name!r}")
raise ValueError(
f"Unknown remote protocol {name!r}; expected one of {', '.join(_PROTOCOL_STEMS)}"
)
cg.add_define(protocol_define(name))