openal-soft/al/eax/utils.cpp
Chris Robinson 74b2e3b349 Remove an unused struct
And minor formatting cleanup
2022-07-05 09:27:44 -07:00

27 lines
555 B
C++

#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);
try {
std::rethrow_exception(exception_ptr);
}
catch(const std::exception& ex) {
const auto ex_message = ex.what();
ERR("%s %s\n", message ? message : "", ex_message);
}
catch(...) {
ERR("%s %s\n", message ? message : "", "Generic exception.");
}
}