Robot Dynamics Library
FrameExceptions.hpp
Go to the documentation of this file.
1 // Copyright (c) 2017 Jordan Lack <jlack1987@gmail.com>
2 // RDL - Robot Dynamics Library
3 // Licensed under the zlib license. See LICENSE for more details.
4 
5 #ifndef __RDL_FRAME_EXCEPTIONS__
6 #define __RDL_FRAME_EXCEPTIONS__
7 
17 #include <stdexcept>
18 #include <exception>
19 
20 namespace RobotDynamics
21 {
27 class ReferenceFrameException : public std::exception
28 {
29  public:
34  explicit ReferenceFrameException(const std::string& err) : msg(err)
35  {
36  }
37 
38  virtual const char* what() const throw()
39  {
40  return msg.c_str();
41  }
42 
43  std::string msg ;
44 };
45 } // namespace RobotDynamics
46 #endif // ifndef __RDL_FRAME_EXCEPTIONS__
A custom exception for frame operations.
Definition: FrameExceptions.hpp:28
virtual const char * what() const
Definition: FrameExceptions.hpp:38
std::string msg
Definition: FrameExceptions.hpp:43
ReferenceFrameException(const std::string &err)
Constructor.
Definition: FrameExceptions.hpp:34
Namespace for all structures of the RobotDynamics library.
Definition: examples.hpp:19