SmirnovKirill commented on a change in pull request #532: handle
WstxLazyException for pretty logging
URL: https://github.com/apache/cxf/pull/532#discussion_r270901147
##########
File path:
rt/features/logging/src/main/java/org/apache/cxf/ext/logging/event/PrettyLoggingFilter.java
##########
@@ -77,9 +78,9 @@ private String getPrettyMessage(LogEvent event) {
try {
StaxUtils.copy(xreader, xwriter);
xwriter.flush();
- } catch (XMLStreamException xse) {
+ } catch (XMLStreamException | WstxLazyException e) {
Review comment:
But can't we just catch any exception without any additional checks? Because
code in the catch block doesn't depend on any particular exception class. And
it's definitely not good if any exception will go beyond this method because in
this case logging will cause crash of the whole request.
----------------------------------------------------------------
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]
With regards,
Apache Git Services