Tidying
This commit is contained in:
@@ -11,14 +11,6 @@ namespace Bloom::Exceptions
|
||||
: std::runtime_error("")
|
||||
{}
|
||||
|
||||
virtual ~Exception() = default;
|
||||
|
||||
Exception(const Exception& other) noexcept = default;
|
||||
Exception(Exception&& other) = default;
|
||||
|
||||
Exception& operator = (const Exception& other) = default;
|
||||
Exception& operator = (Exception&& other) = default;
|
||||
|
||||
explicit Exception(const std::string& message)
|
||||
: std::runtime_error(message.c_str())
|
||||
, message(message)
|
||||
@@ -29,11 +21,19 @@ namespace Bloom::Exceptions
|
||||
, 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();
|
||||
}
|
||||
|
||||
std::string getMessage() const {
|
||||
const std::string& getMessage() const {
|
||||
return this->message;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user