aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--al/eax/utils.cpp19
1 files changed, 5 insertions, 14 deletions
diff --git a/al/eax/utils.cpp b/al/eax/utils.cpp
index 9fa2871d..1ee7dbc7 100644
--- a/al/eax/utils.cpp
+++ b/al/eax/utils.cpp
@@ -12,25 +12,16 @@ 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
- {
+ try {
std::rethrow_exception(exception_ptr);
}
- catch (const std::exception& ex)
- {
+ catch(const std::exception& ex) {
const auto ex_message = ex.what();
- ERR("%s\n", ex_message);
+ ERR("%s %s\n", message ? message : "", ex_message);
}
- catch (...)
- {
- ERR("%s\n", "Generic exception.");
+ catch(...) {
+ ERR("%s %s\n", message ? message : "", "Generic exception.");
}
}