diff --git a/tools/rosnode/src/rosnode/__init__.py b/tools/rosnode/src/rosnode/__init__.py index 44917fb117..54dc0d3732 100644 --- a/tools/rosnode/src/rosnode/__init__.py +++ b/tools/rosnode/src/rosnode/__init__.py @@ -808,9 +808,12 @@ def rosnodemain(argv=None): _fullusage() except socket.error: print("Network communication failed. Most likely failed to communicate with master.", file=sys.stderr) + sys.exit(1) except rosgraph.MasterError as e: print("ERROR: "+str(e), file=sys.stderr) + sys.exit(1) except ROSNodeException as e: print("ERROR: "+str(e), file=sys.stderr) + sys.exit(1) except KeyboardInterrupt: pass