From cef4993f6d679e72a8833d7dcccef3c111003058 Mon Sep 17 00:00:00 2001 From: Felix Glinka Date: Fri, 28 Aug 2020 12:47:21 +0200 Subject: [PATCH] Extract joint names in error messages from exception --- tasks/Conversions.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tasks/Conversions.cpp b/tasks/Conversions.cpp index dd6f3d1..7570486 100644 --- a/tasks/Conversions.cpp +++ b/tasks/Conversions.cpp @@ -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; } } @@ -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; } } @@ -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; } }