* Base class for exceptions in lxcpp
*/
struct Exception: public std::runtime_error {
- Exception(const std::string& message)
+ explicit Exception(const std::string& message)
: std::runtime_error(message) {}
};
struct NotImplementedException: public Exception {
- NotImplementedException(const std::string& message = "Functionality not yet implemented")
+ explicit NotImplementedException(const std::string& message = "Functionality not yet implemented")
: Exception(message) {}
};
struct ProcessSetupException: public Exception {
- ProcessSetupException(const std::string& message = "Error during setting up a process")
+ explicit ProcessSetupException(const std::string& message = "Error while setting up a process")
+ : Exception(message) {}
+};
+
+struct FileSystemSetupException: public Exception {
+ explicit FileSystemSetupException(const std::string& message = "Error during a file system operation")
+ : Exception(message) {}
+};
+
+struct EnvironmentSetupException: public Exception {
+ explicit EnvironmentSetupException(const std::string& message = "Error during handling environment variables")
+ : Exception(message) {}
+};
+
+struct CredentialSetupException: public Exception {
+ explicit CredentialSetupException(const std::string& message = "Error during handling environment variables")
+ : Exception(message) {}
+};
+
+struct CapabilitySetupException: public Exception {
+ explicit CapabilitySetupException(const std::string& message = "Error during a capability operation")
+ : Exception(message) {}
+};
+
+struct UtilityException: public Exception {
+ explicit UtilityException(const std::string& message = "Error during an utility operation")
+ : Exception(message) {}
+};
+
+struct TerminalException: public Exception {
+ explicit TerminalException(const std::string& message = "Error during a terminal operation")
: Exception(message) {}
};
struct BadArgument: public Exception {
- BadArgument(const std::string& message = "Bad argument passed")
+ explicit BadArgument(const std::string& message = "Bad argument passed")
+ : Exception(message) {}
+};
+
+struct NoSuchValue: public Exception {
+ explicit NoSuchValue(const std::string& message = "Value not found")
+ : Exception(message) {}
+};
+
+struct NetworkException : public Exception {
+ explicit NetworkException (const std::string& message = "Error during setting up a network")
+ : Exception(message) {}
+};
+
+struct ConfigureException: public Exception {
+ explicit ConfigureException(const std::string& message = "Error while configuring a container")
+ : Exception(message) {}
+};
+
+struct ProvisionException: public Exception {
+ explicit ProvisionException(const std::string& message = "Provision error")
: Exception(message) {}
};