You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@plc4x.apache.org by cd...@apache.org on 2020/09/08 10:38:12 UTC

[plc4x] branch develop updated: - Make the NiFi module forward the exceptions which actually are the cause of a ProcessingException.

This is an automated email from the ASF dual-hosted git repository.

cdutz pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/plc4x.git


The following commit(s) were added to refs/heads/develop by this push:
     new bc60162  - Make the NiFi module forward the exceptions which actually are the cause of a ProcessingException.
bc60162 is described below

commit bc6016299341299bcb613e6a0f6198c2a68f7dfb
Author: Christofer Dutz <ch...@c-ware.de>
AuthorDate: Tue Sep 8 12:38:00 2020 +0200

    - Make the NiFi module forward the exceptions which actually are the cause of a ProcessingException.
---
 .../src/main/java/org/apache/plc4x/nifi/Plc4xSinkProcessor.java         | 2 +-
 .../src/main/java/org/apache/plc4x/nifi/Plc4xSourceProcessor.java       | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/plc4j/integrations/apache-nifi/nifi-plc4x-processors/src/main/java/org/apache/plc4x/nifi/Plc4xSinkProcessor.java b/plc4j/integrations/apache-nifi/nifi-plc4x-processors/src/main/java/org/apache/plc4x/nifi/Plc4xSinkProcessor.java
index a1c1b2e..348c9df 100644
--- a/plc4j/integrations/apache-nifi/nifi-plc4x-processors/src/main/java/org/apache/plc4x/nifi/Plc4xSinkProcessor.java
+++ b/plc4j/integrations/apache-nifi/nifi-plc4x-processors/src/main/java/org/apache/plc4x/nifi/Plc4xSinkProcessor.java
@@ -78,7 +78,7 @@ public class Plc4xSinkProcessor extends BasePlc4xProcessor {
         } catch (ProcessException e) {
             throw e;
         } catch (Exception e) {
-            throw new ProcessException("Got an error while trying to get a connection");
+            throw new ProcessException("Got an error while trying to get a connection", e);
         }
     }
 
diff --git a/plc4j/integrations/apache-nifi/nifi-plc4x-processors/src/main/java/org/apache/plc4x/nifi/Plc4xSourceProcessor.java b/plc4j/integrations/apache-nifi/nifi-plc4x-processors/src/main/java/org/apache/plc4x/nifi/Plc4xSourceProcessor.java
index a19c4bb..8393f6f 100644
--- a/plc4j/integrations/apache-nifi/nifi-plc4x-processors/src/main/java/org/apache/plc4x/nifi/Plc4xSourceProcessor.java
+++ b/plc4j/integrations/apache-nifi/nifi-plc4x-processors/src/main/java/org/apache/plc4x/nifi/Plc4xSourceProcessor.java
@@ -82,7 +82,7 @@ public class Plc4xSourceProcessor extends BasePlc4xProcessor {
         } catch (ProcessException e) {
             throw e;
         } catch (Exception e) {
-            throw new ProcessException("Got an error while trying to get a connection");
+            throw new ProcessException("Got an error while trying to get a connection", e);
         }
     }