Error system simplification
This commit is contained in:
@@ -1,13 +0,0 @@
|
||||
#include "Errors.hpp"
|
||||
#include "TypeTraits.hpp"
|
||||
|
||||
namespace nb {
|
||||
|
||||
const std::string Error<>::type = "nb::Error";
|
||||
|
||||
const ErrorCodeMap Error<nb::NoneType>::ErrorMessages = {
|
||||
{Error::Codes::STANDARD, "std::exception"},
|
||||
{Error::Codes::UNDEFINED, "Error"}
|
||||
};
|
||||
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
#include "ErrorsImpl.hpp"
|
||||
|
||||
namespace nb {
|
||||
|
||||
const std::string Error<>::type = "nb::Error";
|
||||
const ErrorCodeMap Error<>::ErrorMessages = {
|
||||
{Error::Codes::STANDARD, "std::exception"},
|
||||
{Error::Codes::UNDEFINED, "Error"}
|
||||
};
|
||||
|
||||
//ErrorBase::
|
||||
|
||||
ErrorBase::ErrorBase(const std::exception& exception_) noexcept
|
||||
: ErrorBase(Error<NoneType>(exception_)) {}
|
||||
|
||||
}
|
||||
@@ -33,6 +33,6 @@ static bool RUN_LOGGER(nb::DefaultDebugLogger& log) {
|
||||
return log.run();
|
||||
}
|
||||
|
||||
static const bool LOGGER_RUNNING = RUN_LOGGER(logger);
|
||||
const bool LOGGER_RUNNING = RUN_LOGGER(logger);
|
||||
|
||||
} // namespace nb
|
||||
Reference in New Issue
Block a user