Skip to content

Commit

Permalink
rosnode: Return exit code 1 if there is an error. (#1178)
Browse files Browse the repository at this point in the history
  • Loading branch information
luator authored and dirk-thomas committed Oct 26, 2017
1 parent 6e906e4 commit 3cfef19
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tools/rosnode/src/rosnode/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -807,9 +807,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

0 comments on commit 3cfef19

Please sign in to comment.