From c30ee5c1178d4c28790a06c3301f57cc702507e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Lolling=20=28Kl=C3=B6ckner?= Date: Thu, 2 Feb 2023 08:57:02 +0100 Subject: [PATCH] Error message improved --- pom.xml | 6 +++++- .../java/de/jlo/talendcomp/sap/impl/TableInputImpl.java | 4 ++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/pom.xml b/pom.xml index 9c85702..58d514e 100644 --- a/pom.xml +++ b/pom.xml @@ -21,6 +21,10 @@ com.sap.jco sapjco 3.0.21 + system + + + ${sapjco3Path} org.apache.commons @@ -53,7 +57,7 @@ de.cimt.talendcomp cimt-talendcomp-maven-plugin - 3.2 + 3.3 ${custom_component_folder} diff --git a/src/main/java/de/jlo/talendcomp/sap/impl/TableInputImpl.java b/src/main/java/de/jlo/talendcomp/sap/impl/TableInputImpl.java index d21aa50..f48d11b 100644 --- a/src/main/java/de/jlo/talendcomp/sap/impl/TableInputImpl.java +++ b/src/main/java/de/jlo/talendcomp/sap/impl/TableInputImpl.java @@ -120,12 +120,12 @@ public void execute() throws Exception { tableInputOptions.firstRow(); for (String part : filterPartList) { if (part.length() > 72) { - throw new Exception("The filter expression: <" + filter + "> contains a part which is larger than 72 chars. Affected part: <"+ part + ">. Please split the filter with: <" + filterPartSeparator + "> into parts smaller than 72 chars"); + throw new Exception("The filter expression: <" + filter + "> contains a part with a length of " + part.length() + " which is larger than 72 chars.\nAffected part is: <"+ part + ">.\nPlease split the filter with the delimiter: <" + filterPartSeparator + "> into parts smaller than 72 chars"); } tableInputOptions.setValue("TEXT", part); tableInputOptions.nextRow(); } - } + } // add fields if (listFields.isEmpty()) { throw new Exception("List of expected fields cannot not be empty");