Error system simplification

This commit is contained in:
NaifBanana
2026-06-26 02:43:16 -05:00
parent cff7164d27
commit e4b164f29a
9 changed files with 279 additions and 332 deletions
-13
View File
@@ -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"}
};
}
+16
View File
@@ -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_)) {}
}
+1 -1
View File
@@ -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