From 1428c6424014714b5a712cd6fa4e8cd8edd19651 Mon Sep 17 00:00:00 2001 From: Sergi Hernandez Juan <shernand@iri.upc.edu> Date: Mon, 2 Sep 2019 10:49:01 +0200 Subject: [PATCH] Added an Unsupported Feature exception. --- src/dynamixel_motor_exceptions.cpp | 8 ++++++++ src/dynamixel_motor_exceptions.h | 13 +++++++++++++ 2 files changed, 21 insertions(+) diff --git a/src/dynamixel_motor_exceptions.cpp b/src/dynamixel_motor_exceptions.cpp index 00402ba..06a1bc3 100644 --- a/src/dynamixel_motor_exceptions.cpp +++ b/src/dynamixel_motor_exceptions.cpp @@ -5,6 +5,7 @@ const std::string dynamixel_motor_error_message="DynamixelMotor error - "; const std::string dynamixel_motor_group_error_message="DynamixelMotorGroup error - "; +const std::string dynamixel_motor_unsupported_feature_error_message="DynamixelMotorUnsupportedFeature error - "; const std::string dynamixel_motion_sequence_error_message="DynamixelMotionSeq error - "; CDynamixelMotorException::CDynamixelMotorException(const std::string& where,const std::string &error_msg):CException(where,dynamixel_motor_error_message) @@ -21,6 +22,13 @@ CDynamixelMotorGroupException::CDynamixelMotorGroupException(const std::string& this->error_msg+=error_msg; } +CDynamixelMotorUnsupportedFeatureException::CDynamixelMotorUnsupportedFeatureException(const std::string& where,const std::string &error_msg):CException(where,dynamixel_motor_unsupported_feature_error_message) +{ + std::stringstream text; + + this->error_msg+=error_msg; +} + CDynamixelMotionSequenceException::CDynamixelMotionSequenceException(const std::string& where,const std::string &error_msg):CException(where,dynamixel_motion_sequence_error_message) { std::stringstream text; diff --git a/src/dynamixel_motor_exceptions.h b/src/dynamixel_motor_exceptions.h index 25487ee..aca7ee2 100644 --- a/src/dynamixel_motor_exceptions.h +++ b/src/dynamixel_motor_exceptions.h @@ -33,6 +33,19 @@ class CDynamixelMotorGroupException : public CException CDynamixelMotorGroupException(const std::string& where,const std::string &error_msg); }; +/** + * \brief + */ +class CDynamixelMotorUnsupportedFeatureException : public CException +{ + public: + /** + * \brief + * + */ + CDynamixelMotorUnsupportedFeatureException(const std::string& where,const std::string &error_msg); +}; + /** * \brief */ -- GitLab