diff --git a/panther_utils/panther_utils/integration_test_utils.py b/panther_utils/panther_utils/integration_test_utils.py index 47dd47391..621f906c1 100644 --- a/panther_utils/panther_utils/integration_test_utils.py +++ b/panther_utils/panther_utils/integration_test_utils.py @@ -41,6 +41,9 @@ def get_node_info(node_name: str) -> ROSNodeInfo: Returns: ROSNodeInfo: An object representing a complete node info. + + Raises: + RuntimeError: If the command execution fails. """ node_info = ROSNodeInfo() @@ -73,7 +76,6 @@ def get_node_info(node_name: str) -> ROSNodeInfo: current_section = None except subprocess.CalledProcessError as e: - print(f"Error executing command: {e}") - print(f"stderr: {e.stderr}") + raise RuntimeError(f"Error executing command: {e}. stderr: {e.stderr}") from e return node_info