🛠️🐜 Antkeeper superbuild with dependencies included https://antkeeper.com
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

36 lines
581 B

#include "config.h"
#include "utils.h"
#include <cassert>
#include <exception>
#include "core/logging.h"
void eax_log_exception(
const char* message) noexcept
{
const auto exception_ptr = std::current_exception();
assert(exception_ptr);
if (message)
{
ERR("%s\n", message);
}
try
{
std::rethrow_exception(exception_ptr);
}
catch (const std::exception& ex)
{
const auto ex_message = ex.what();
ERR("%s\n", ex_message);
}
catch (...)
{
ERR("%s\n", "Generic exception.");
}
}