Error logging almost working!

This commit is contained in:
NaifBanana
2026-04-19 19:19:47 -05:00
parent a5dc639958
commit 85241b4aa5
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;
}