Skip to content

Commit

Permalink
small rework of entry point and some error handling things
Browse files Browse the repository at this point in the history
  • Loading branch information
GlynLeine committed Dec 10, 2024
1 parent 37cdb61 commit 09ce7e5
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 5 deletions.
34 changes: 32 additions & 2 deletions applications/core_test/src/core_test/source.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,38 @@

#include <core/core.hpp>

void RYTHE_CCONV reportModules(rythe::core::Program* program)
enum struct test_error : rsl::errc
{
no_error = 0,
hi,
no,
fuck,
you
};

void assert_handler(
std::string_view expression, std::string_view file, rsl::size_type line, std::string_view message, bool soft
)
{
rsl::log::undecoratedln(
soft ? rsl::log::severity::warn : rsl::log::severity::fatal,
"Assertion failed:\t{}\nExpected:\t\t{}\nSource:\t\t\t{}, line {}", message, expression, file, line
);

__debugbreak();
}

rsl::result<void> RYTHE_CCONV init_program(rythe::core::Program& program)
{
rsl::asserts::assert_handler = &assert_handler;

rsl::result<void> result;

rsl::log::debug("Initilizing Core-Application");
program->addEngineInstance();
program.addEngineInstance();

rsl::append_error(result, test_error::no, "NOPE");
rsl::append_warning(result, test_error::hi, "HEEEEYYYYY");

return result;
}
2 changes: 1 addition & 1 deletion modules/rythe/core
5 changes: 4 additions & 1 deletion premake5.lua
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
-- root workspace, all sub-project should be included
workspace "rythe"
location("build/" .. _ACTION)
configurations { "Debug", "Development", "Release", "Debug-asan", "Release-profiling" }
configurations { "Debug", "Debug-no-inline", "Development", "Release", "Debug-asan", "Release-profiling" }

os.chdir(_MAIN_SCRIPT_DIR)

filter("configurations:Debug-no-inline")
defines { "RYTHE_DISABLE_ALWAYS_INLINE" }

local r = require("premake/rythe")

r.configure()

0 comments on commit 09ce7e5

Please sign in to comment.