aboutsummaryrefslogtreecommitdiffstats
path: root/al/eax/utils.cpp
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2023-08-25 14:52:09 -0700
committerChris Robinson <[email protected]>2023-08-25 14:52:09 -0700
commitf1a67347a6cf4b6d397fe1220b999ed7161c7097 (patch)
treeda48b7cd24ef0622e6c47f4bb368ac21bb71d776 /al/eax/utils.cpp
parentca3bc1bd80fdff511e83d563a4ee94d6cd885473 (diff)
Use string_view in a couple more places
Diffstat (limited to 'al/eax/utils.cpp')
-rw-r--r--al/eax/utils.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/al/eax/utils.cpp b/al/eax/utils.cpp
index b3ed6ca1..53599ac5 100644
--- a/al/eax/utils.cpp
+++ b/al/eax/utils.cpp
@@ -8,7 +8,7 @@
#include "core/logging.h"
-void eax_log_exception(const char *message) noexcept
+void eax_log_exception(std::string_view message) noexcept
{
const auto exception_ptr = std::current_exception();
assert(exception_ptr);
@@ -18,9 +18,9 @@ void eax_log_exception(const char *message) noexcept
}
catch(const std::exception& ex) {
const auto ex_message = ex.what();
- ERR("%s %s\n", message ? message : "", ex_message);
+ ERR("%.*s %s\n", static_cast<int>(message.length()), message.data(), ex_message);
}
catch(...) {
- ERR("%s %s\n", message ? message : "", "Generic exception.");
+ ERR("%.*s %s\n", static_cast<int>(message.length()), message.data(), "Generic exception.");
}
}