Error logging almost working!

This commit is contained in:
NaifBanana
2026-06-11 04:24:06 -05:00
parent 40cf079e9d
commit 0f62aecfa3
8 changed files with 73 additions and 31 deletions
+8
View File
@@ -12,5 +12,13 @@ if (NB_BUILD_TESTS)
NBCore
GTest::gtest_main
)
add_executable(LoggerTest
./testLogger.cpp
)
target_link_libraries(LoggerTest
NBCore
)
gtest_discover_tests(TestCore)
endif()
+17
View File
@@ -0,0 +1,17 @@
#include <exception>
#include "Errors.hpp"
#include "Logger.hpp"
int main() {
nb::logger.log("Whoop!");
try {
THROW(nb::Error, "Hiii!");
} catch (nb::Error<nb::NoneType> e){
nb::logger.log("Winner winner chicken dinner!");
}
return 0;
}