martinzink commented on code in PR #2246:
URL: https://github.com/apache/nifi-minifi-cpp/pull/2246#discussion_r3892650686


##########
minifi_rust/minifi_native/src/api/processor_wrappers/flow_file_stream_transform.rs:
##########
@@ -100,14 +108,23 @@ where
         &ContextSessionFlowFileBundle<PC, PS>,
         &mut dyn InputStream,
         &mut dyn OutputStream,
-    ) -> Result<TransformStreamResult, MinifiError>,
+    ) -> Result<TransformStreamResult, ProcessError>,
 {
     if let Some(mut flow_file) = session.get() {
         let simple_context = ContextSessionFlowFileBundle::new(context, 
session, Some(&flow_file));
 
         let (relationship, attrs) = session.read_stream(&flow_file, 
|input_stream| {
             session.write_stream(&flow_file, |output_stream| {
-                let transformed = transform_fn(&simple_context, input_stream, 
output_stream)?;
+                let transformed = match transform_fn(&simple_context, 
input_stream, output_stream) {
+                    Ok(t) => t,
+                    Err(ProcessError::Route(route)) => {
+                        route.log(logger);
+                        
TransformStreamResult::route_without_changes_by_name(route.relationship)
+                    }
+                    Err(ProcessError::Fatal(e)) => {
+                        return Err(e);

Review Comment:
   this returns from outer scope so this wouldnt work here



-- 
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]

Reply via email to