2024-03-21 17:33:47 +00:00
|
|
|
#include "config.h"
|
|
|
|
|
|
|
|
|
|
#include "utils.h"
|
|
|
|
|
|
|
|
|
|
#include <cassert>
|
|
|
|
|
#include <exception>
|
|
|
|
|
|
|
|
|
|
#include "core/logging.h"
|
|
|
|
|
|
|
|
|
|
|
2024-06-30 19:35:57 +00:00
|
|
|
void eax_log_exception(std::string_view message) noexcept
|
2024-03-21 17:33:47 +00:00
|
|
|
{
|
|
|
|
|
const auto exception_ptr = std::current_exception();
|
|
|
|
|
assert(exception_ptr);
|
|
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
std::rethrow_exception(exception_ptr);
|
|
|
|
|
}
|
|
|
|
|
catch(const std::exception& ex) {
|
2025-09-03 16:09:27 +00:00
|
|
|
ERR("{} {}", message, ex.what());
|
2024-03-21 17:33:47 +00:00
|
|
|
}
|
|
|
|
|
catch(...) {
|
2025-09-03 16:09:27 +00:00
|
|
|
ERR("{} {}", message, "Generic exception.");
|
2024-03-21 17:33:47 +00:00
|
|
|
}
|
|
|
|
|
}
|