Robot: exit with correct error code