RdlExceptions.hpp
Go to the documentation of this file.
1 /*
2  * RDL - Robot Dynamics Library
3  * Copyright (c) 2017 Jordan Lack <jlack1987@gmail.com>
4  *
5  * Licensed under the zlib license. See LICENSE for more details.
6  */
7 
8 #ifndef __RDL_EXCEPTIONS_HPP__
9 #define __RDL_EXCEPTIONS_HPP__
10 
11 #include <stdexcept>
12 #include <exception>
13 
14 namespace RobotDynamics
15 {
20 class RdlException : public std::exception
21 {
22  public:
27  explicit RdlException(const std::string& err) : msg(err)
28  {
29  }
30 
31  virtual const char* what() const throw()
32  {
33  return msg.c_str();
34  }
35 
36  std::string msg ;
37 };
38 } // namespace RobotDynamics
39 #endif // ifndef __RDL_EXCEPTIONS_HPP__
RdlException(const std::string &err)
Constructor.
virtual const char * what() const
A custom exception.
Namespace for all structures of the RobotDynamics library.
Definition: Body.h:21


rdl_dynamics
Author(s):
autogenerated on Tue Apr 20 2021 02:25:27