Modulo 5.0.0
Loading...
Searching...
No Matches
exceptions.hpp
1#pragma once
2
3#include <stdexcept>
4#include <string>
5
11
17class CoreException : public std::runtime_error {
18public:
19 explicit CoreException(const std::string& msg) : CoreException("CoreException", msg){};
20
21protected:
22 CoreException(const std::string& prefix, const std::string& msg) : std::runtime_error(prefix + ": " + msg) {}
23};
24
31public:
32 explicit AddServiceException(const std::string& msg) : CoreException("AddServiceException", msg) {}
33};
34
41public:
42 explicit AddSignalException(const std::string& msg) : CoreException("AddSignalException", msg) {}
43};
44
51public:
52 explicit InvalidPointerCastException(const std::string& msg) : CoreException("InvalidPointerCastException", msg) {}
53};
54
61public:
62 explicit InvalidPointerException(const std::string& msg) : CoreException("InvalidPointerException", msg) {}
63};
64
72public:
73 explicit LookupTransformException(const std::string& msg) : CoreException("LookupTransformException", msg) {}
74};
75
81public:
82 explicit MessageTranslationException(const std::string& msg) : CoreException("MessageTranslationException", msg) {}
83};
84
91public:
92 explicit NullPointerException(const std::string& msg) : CoreException("NullPointerException", msg) {}
93};
94
102public:
103 explicit ParameterException(const std::string& msg) : CoreException("ParameterException", msg) {}
104};
105
113public:
114 explicit ParameterTranslationException(const std::string& msg)
115 : CoreException("ParameterTranslationException", msg) {}
116};
117}// namespace modulo_core::exceptions
An exception class to notify errors when adding a service.
An exception class to notify errors when adding a signal.
A base class for all core exceptions.
An exception class to notify if the result of getting an instance of a derived class through dynamic ...
An exception class to notify if an object has no reference count (if the object is not owned by any p...
An exception class to notify an error while looking up TF transforms.
An exception class to notify that the translation of a ROS message failed.
An exception class to notify that a certain pointer is null.
An exception class to notify errors with parameters in modulo classes.
An exception class to notify incompatibility when translating parameters from different sources.
Modulo Core exceptions module for defining exception classes.