diff options
author | Sven Gothel <sgothel@jausoft.com> | 2023-11-28 12:51:46 +0100 |
---|---|---|
committer | Sven Gothel <sgothel@jausoft.com> | 2023-11-28 12:51:46 +0100 |
commit | 1aaf4f070011490bcece50394b9b32dfa593fd9e (patch) | |
tree | 17d68284e401a35eea3d3a574d986d446a60763a /al/eax/utils.cpp | |
parent | 6e7cee4fa9a8af03f28ca26cd89f8357390dfc90 (diff) | |
parent | 571b546f35eead77ce109f8d4dd6c3de3199d573 (diff) |
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'al/eax/utils.cpp')
-rw-r--r-- | al/eax/utils.cpp | 6 |
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."); } } |