This commit is contained in:
Nav
2021-04-06 02:10:14 +01:00
parent 2fd045e056
commit 7a28f93ee9
85 changed files with 319 additions and 1177 deletions

View File

@@ -7,11 +7,11 @@ namespace Bloom::Exceptions
class DeviceCommunicationFailure: public Exception
{
public:
explicit DeviceCommunicationFailure(const std::string& message) : Exception(message) {
explicit DeviceCommunicationFailure(const std::string& message): Exception(message) {
this->message = message;
}
explicit DeviceCommunicationFailure(const char* message) : Exception(message) {
explicit DeviceCommunicationFailure(const char* message): Exception(message) {
this->message = std::string(message);
}
};

View File

@@ -1,6 +1,7 @@
#pragma once
#include <stdexcept>
namespace Bloom::Exceptions
{
class Exception: public std::runtime_error
@@ -9,13 +10,13 @@ namespace Bloom::Exceptions
std::string message;
public:
explicit Exception() : std::runtime_error("") {}
explicit Exception(): std::runtime_error("") {}
explicit Exception(const std::string& message) : std::runtime_error(message.c_str()) {
explicit Exception(const std::string& message): std::runtime_error(message.c_str()) {
this->message = message;
}
explicit Exception(const char* message) : std::runtime_error(message) {
explicit Exception(const char* message): std::runtime_error(message) {
this->message = std::string(message);
}

View File

@@ -6,11 +6,11 @@ namespace Bloom::Exceptions
class InvalidConfig: public Exception
{
public:
explicit InvalidConfig(const std::string& message) : Exception(message) {
explicit InvalidConfig(const std::string& message): Exception(message) {
this->message = message;
}
explicit InvalidConfig(const char* message) : Exception(message) {
explicit InvalidConfig(const char* message): Exception(message) {
this->message = std::string(message);
}
};

View File

@@ -6,11 +6,11 @@ namespace Bloom::Exceptions
class TargetControllerStartupFailure: public Exception
{
public:
explicit TargetControllerStartupFailure(const std::string& message) : Exception(message) {
explicit TargetControllerStartupFailure(const std::string& message): Exception(message) {
this->message = message;
}
explicit TargetControllerStartupFailure(const char* message) : Exception(message) {
explicit TargetControllerStartupFailure(const char* message): Exception(message) {
this->message = std::string(message);
}
};