enable v2 errors
Some checks failed
BlockStorage/repertory/pipeline/head There was a failure building this commit

This commit is contained in:
2025-04-15 14:27:58 -05:00
parent a8723a6b02
commit 0bfe1e1ccd
3 changed files with 39 additions and 9 deletions

View File

@ -22,6 +22,7 @@
#include "utils/error_utils.hpp"
#include "events/event_system.hpp"
#include "events/types/debug_log.hpp"
#include "events/types/repertory_exception.hpp"
#include "types/repertory.hpp"
#include "utils/error.hpp"
@ -29,6 +30,12 @@
namespace {
struct repertory_exception_handler final
: repertory::utils::error::i_exception_handler {
void handle_debug(std::string_view function_name,
std::string_view msg) const override {
repertory::event_system::instance().raise<repertory::debug_log>(
function_name, msg);
}
void handle_error(std::string_view function_name,
std::string_view msg) const override {
repertory::utils::error::raise_error(function_name, msg);
@ -42,6 +49,24 @@ struct repertory_exception_handler final
const std::exception &ex) const override {
repertory::utils::error::raise_error(function_name, ex);
}
void handle_info(std::string_view function_name,
std::string_view msg) const override {
repertory::event_system::instance().raise<repertory::debug_log>(
function_name, msg);
}
void handle_trace(std::string_view function_name,
std::string_view msg) const override {
repertory::event_system::instance().raise<repertory::debug_log>(
function_name, msg);
}
void handle_warn(std::string_view function_name,
std::string_view msg) const override {
repertory::event_system::instance().raise<repertory::debug_log>(
function_name, msg);
}
};
const auto repertory_handler{