updated build system
This commit is contained in:
@ -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) {
|
||||
|
Reference in New Issue
Block a user