dan-s1 commented on code in PR #6798:
URL: https://github.com/apache/nifi/pull/6798#discussion_r1053707406
##########
nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/TransformXml.java:
##########
@@ -372,4 +382,27 @@ private Source getSecureSource(final StreamSource
streamSource) throws Transform
throw new TransformerConfigurationException("XSLT Source Stream
Reader creation failed", e);
}
}
+}
+
+class ErrorListenerLogger implements ErrorListener {
+ private final ComponentLog logger;
+
+ ErrorListenerLogger(ComponentLog logger) {
+ this.logger = logger;
+ }
+
+ @Override
+ public void warning(TransformerException exception) throws
TransformerException {
+ logger.warn(exception.getMessageAndLocation());
+ }
+
+ @Override
+ public void error(TransformerException exception) throws
TransformerException {
+ logger.error(exception.getMessageAndLocation());
+ }
+
+ @Override
+ public void fatalError(TransformerException exception) throws
TransformerException {
Review Comment:
So I just rethrow the exception argument like below ?
`throw exception;`
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]