Skip to content

Commit

Permalink
Improve error message if ComposableNodeContainer 'name' or 'namespace…
Browse files Browse the repository at this point in the history
…' arg is None (#191)

* Add error message if ComposableNodeContainer 'namespace' arg is None

This restores the original behavior in Eloquent and Foxy, but with an improved error message.

Signed-off-by: Jacob Perron <jacob@openrobotics.org>

* Improve error message for no node name

Signed-off-by: Jacob Perron <jacob@openrobotics.org>
  • Loading branch information
jacobperron committed Oct 21, 2020
1 parent fa16aea commit 37bf199
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion launch_ros/launch_ros/actions/composable_node_container.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,13 @@ def __init__(
)
namespace = node_namespace

if not namespace:
if name is None:
raise RuntimeError("'name' is a required argument")

if namespace is None:
raise RuntimeError("'namespace' is a required argument")

if namespace == '':
namespace = '/'
super().__init__(name=name, namespace=namespace, **kwargs)
self.__composable_node_descriptions = composable_node_descriptions
Expand Down

0 comments on commit 37bf199

Please sign in to comment.