Initial commit

This commit is contained in:
Nav
2021-04-04 21:04:12 +01:00
commit a29c5e1fec
549 changed files with 441216 additions and 0 deletions

View File

@@ -0,0 +1,12 @@
#pragma once
#include "Exception.hpp"
namespace Bloom::Exceptions
{
class DebugServerInterrupted: public Exception
{
public:
explicit DebugServerInterrupted() = default;
};
}

View File

@@ -0,0 +1,18 @@
#pragma once
#include "Exception.hpp"
namespace Bloom::Exceptions
{
class DeviceCommunicationFailure: public Exception
{
public:
explicit DeviceCommunicationFailure(const std::string& message) : Exception(message) {
this->message = message;
}
explicit DeviceCommunicationFailure(const char* message) : Exception(message) {
this->message = std::string(message);
}
};
}

View File

@@ -0,0 +1,30 @@
#pragma once
#include <stdexcept>
namespace Bloom::Exceptions
{
class Exception: public std::runtime_error
{
protected:
std::string message;
public:
explicit Exception() : std::runtime_error("") {}
explicit Exception(const std::string& message) : std::runtime_error(message.c_str()) {
this->message = message;
}
explicit Exception(const char* message) : std::runtime_error(message) {
this->message = std::string(message);
}
const char* what() const noexcept override {
return this->message.c_str();
}
std::string getMessage() const {
return this->message;
}
};
}

View File

@@ -0,0 +1,17 @@
#pragma once
#include "Exception.hpp"
namespace Bloom::Exceptions
{
class InvalidConfig: public Exception
{
public:
explicit InvalidConfig(const std::string& message) : Exception(message) {
this->message = message;
}
explicit InvalidConfig(const char* message) : Exception(message) {
this->message = std::string(message);
}
};
}

View File

@@ -0,0 +1,17 @@
#pragma once
#include "Exception.hpp"
namespace Bloom::Exceptions
{
class TargetControllerStartupFailure: public Exception
{
public:
explicit TargetControllerStartupFailure(const std::string& message) : Exception(message) {
this->message = message;
}
explicit TargetControllerStartupFailure(const char* message) : Exception(message) {
this->message = std::string(message);
}
};
}