ConfigurationException¶
-
class ConfigurationException : public std::runtime_error¶
- #include <cppmicroservices/cm/ConfigurationException.hpp>
Exception which may be thrown by ManagedService or ManagedServiceFactory subclasses to indicate to the ConfigurationAdmin implementation that the Configuration they have been given is invalid.
The ConfigurationAdmin implementation will log the exception with as much detail as it can. The ConfigurationException class is not final to ensure it can be used with std::throw_with_nested - the ConfigurationAdmin implementation will attempt to print the details of any nested exceptions as well.
Public Functions
-
inline ConfigurationException(std::string rsn, std::string prop = "")¶
Construct a new ConfigurationException with the specified reason and optionally specify which property caused the error.
- Parameters:
rsn – The reason for the exception.
prop – The property which caused the excpetion, if applicable.
-
inline std::string GetReason() const¶
Returns the reason for this exception.
- Returns:
The reason for this exception.
-
inline std::string GetProperty() const¶
Returns the property which was resonsible for this exception being throws, if applicable.
Could be empty.
- Returns:
The property which caused this exception.
-
inline virtual ~ConfigurationException() noexcept¶
-
inline ConfigurationException(std::string rsn, std::string prop = "")¶