ams-tschoening commented on a change in pull request #64:
URL: https://github.com/apache/logging-log4cxx/pull/64#discussion_r615864606
##########
File path: src/main/cpp/rollingfileappender.cpp
##########
@@ -308,7 +308,9 @@ bool RollingFileAppenderSkeleton::rolloverInternal(Pool& p)
catch
(std::exception& ex)
{
LogLog::warn(LOG4CXX_STR("Exception on rollover"));
-
errorHandler->error(ex.what(), ex, 0);
+
LogString exmsg;
+
log4cxx::helpers::Transcoder::decode(ex.what(), exmsg);
+
errorHandler->error(exmsg, ex, 0);
Review comment:
Another good example for maybe letting `decode` return a value in
future, like
[discussed](https://github.com/apache/logging-log4cxx/pull/60#issuecomment-814452988)
already. Besides that, using the DECODE-macro might be easier here:
LOG4CXX_DECODE_CHAR(exmsg, ex.what());
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]