- Refactored entire codebase (excluding the Insight component) to accommodate multiple target architectures (no longer specific to AVR) - Deleted 'generate SVD' GDB monitor command - I will eventually move this functionality to the Bloom website - Added unit size property to address spaces - Many other changes which I couldn't be bothered to describe here
44 lines
1.0 KiB
C++
44 lines
1.0 KiB
C++
#pragma once
|
|
|
|
#include <stdexcept>
|
|
|
|
namespace Exceptions
|
|
{
|
|
class Exception: public std::runtime_error
|
|
{
|
|
public:
|
|
explicit Exception()
|
|
: std::runtime_error("")
|
|
{}
|
|
|
|
explicit Exception(const std::string& message)
|
|
: std::runtime_error(message.c_str())
|
|
, message(message)
|
|
{}
|
|
|
|
explicit Exception(const char* message)
|
|
: std::runtime_error(message)
|
|
, message(std::string{message})
|
|
{}
|
|
|
|
virtual ~Exception() = default;
|
|
|
|
Exception(const Exception& other) noexcept = default;
|
|
Exception(Exception&& other) = default;
|
|
|
|
Exception& operator = (const Exception& other) = default;
|
|
Exception& operator = (Exception&& other) = default;
|
|
|
|
const char* what() const noexcept override {
|
|
return this->message.c_str();
|
|
}
|
|
|
|
const std::string& getMessage() const {
|
|
return this->message;
|
|
}
|
|
|
|
protected:
|
|
std::string message;
|
|
};
|
|
}
|