MCPcopy Create free account
hub / github.com/AutonomousFieldRoboticsLab/SVIn / DException

Class DException

pose_graph/ThirdParty/DUtils/DException.h:22–54  ·  view source on GitHub ↗

General exception

Source from the content-addressed store, hash-verified

20
21/// General exception
22class DException : public std::exception {
23 public:
24 /**
25 * Creates an exception with a general error message
26 */
27 DException(void) throw() : m_message("DUtils exception") {}
28
29 /**
30 * Creates an exception with a custom error message
31 * @param msg: message
32 */
33 DException(const char* msg) throw() : m_message(msg) {}
34
35 /**
36 * Creates an exception with a custom error message
37 * @param msg: message
38 */
39 DException(const std::string& msg) throw() : m_message(msg) {}
40
41 /**
42 * Destructor
43 */
44 virtual ~DException(void) throw() {}
45
46 /**
47 * Returns the exception message
48 */
49 virtual const char* what() const throw() { return m_message.c_str(); }
50
51 protected:
52 /// Error message
53 std::string m_message;
54};
55
56} // namespace DUtils
57

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected