Skip to content

Commit dfa6330

Browse files
committed
Improve no translator error message.
Signed-off-by: Michel Hidalgo <[email protected]>
1 parent 2d205a9 commit dfa6330

File tree

1 file changed

+5
-2
lines changed
  • rosidl_cli/rosidl_cli/command/translate

1 file changed

+5
-2
lines changed

rosidl_cli/rosidl_cli/command/translate/api.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,11 @@ def translate(
8888
), None)
8989

9090
if not extension:
91-
raise RuntimeError(f"Translation from '{input_format}' to "
92-
f"'{output_format}' is not supported")
91+
raise RuntimeError('\n'.join([
92+
f"Cannot translate the following files to '{output_format}' format:",
93+
*[f'- {path}' for path in interface_files],
94+
'No translator found'
95+
]))
9396

9497
translated_interface_files.extend(extension.translate(
9598
package_name, interface_files, include_paths, output_path))

0 commit comments

Comments
 (0)