Skip to content

Commit

Permalink
Extract joint names in error messages from exception
Browse files Browse the repository at this point in the history
  • Loading branch information
fglinka committed Aug 28, 2020
1 parent ac5b314 commit cef4993
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tasks/Conversions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ void jointState2RmlTypes(const base::samples::Joints& joint_state, const std::ve
params.CurrentAccelerationVector->VecData[i] = 0;
}
catch(const base::samples::Joints::InvalidName &e){
LOG_ERROR("Element %s has been configured in motion constraints, but is not available in joint state", names[i].c_str());
LOG_ERROR("Element %s has been configured in motion constraints, but is not available in joint state", e.name.c_str());
throw e;
}
}
Expand Down Expand Up @@ -208,7 +208,7 @@ void target2RmlTypes(const ConstrainedJointsCmd& target, const MotionConstraints
}
}
catch(const MotionConstraints::InvalidName &e){
LOG_ERROR("Joint '%s' is in target vector but has not been configured in motion constraints", target.names[i].c_str());
LOG_ERROR("Joint '%s' is in target vector but has not been configured in motion constraints", e.name.c_str());
throw e;
}
}
Expand All @@ -228,7 +228,7 @@ void target2RmlTypes(const ConstrainedJointsCmd& target, const MotionConstraints
}
}
catch(const MotionConstraints::InvalidName &e){
LOG_ERROR("Joint '%s' is in target vector but has not been configured in motion constraints", target.names[i].c_str());
LOG_ERROR("Joint '%s' is in target vector but has not been configured in motion constraints", e.name.c_str());
throw e;
}
}
Expand Down

0 comments on commit cef4993

Please sign in to comment.