updated build system

This commit is contained in:
2024-10-17 10:20:07 -05:00
parent 39d644e115
commit 63ca3089da
22 changed files with 304 additions and 198 deletions

View File

@ -25,6 +25,27 @@ namespace repertory::utils::error {
std::atomic<const i_exception_handler *> exception_handler{
&default_exception_handler};
auto create_error_message(std::string_view function_name,
std::vector<std::string_view> items) -> std::string {
std::stringstream stream{};
stream << function_name;
for (auto &&item : items) {
stream << '|' << item;
}
return stream.str();
}
void handle_error(std::string_view function_name, std::string_view msg) {
const i_exception_handler *handler{exception_handler};
if (handler != nullptr) {
handler->handle_error(function_name, msg);
return;
}
default_exception_handler.handle_error(function_name, msg);
}
void handle_exception(std::string_view function_name) {
const i_exception_handler *handler{exception_handler};
if (handler != nullptr) {