This is an automated email from the ASF dual-hosted git repository. rong pushed a commit to branch pipe-parameter-check-error in repository https://gitbox.apache.org/repos/asf/iotdb.git
commit b2598e322192abe1e5f52066950c88485d7a3fa7 Author: Steve Yurong Su <[email protected]> AuthorDate: Tue Dec 12 13:51:47 2023 +0800 Pipe: Make error message reported by pipe parameter check clearer --- .../iotdb/pipe/api/customizer/parameter/PipeParameterValidator.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/iotdb-api/pipe-api/src/main/java/org/apache/iotdb/pipe/api/customizer/parameter/PipeParameterValidator.java b/iotdb-api/pipe-api/src/main/java/org/apache/iotdb/pipe/api/customizer/parameter/PipeParameterValidator.java index 9ea9fb64d9b..a7f6401c64e 100644 --- a/iotdb-api/pipe-api/src/main/java/org/apache/iotdb/pipe/api/customizer/parameter/PipeParameterValidator.java +++ b/iotdb-api/pipe-api/src/main/java/org/apache/iotdb/pipe/api/customizer/parameter/PipeParameterValidator.java @@ -56,7 +56,7 @@ public class PipeParameterValidator { throws PipeAttributeNotProvidedException { if (!parameters.hasAttribute(key)) { if (!canBeOptional) { - throw new PipeAttributeNotProvidedException(String.format("%s should be set.", key)); + throw new PipeParameterNotValidException(String.format("Parameter %s should be set.", key)); } return this; } @@ -68,8 +68,8 @@ public class PipeParameterValidator { } } - throw new PipeAttributeNotProvidedException( - String.format("%s should be one of %s", key, Arrays.toString(optionalValues))); + throw new PipeParameterNotValidException( + String.format("The value of %s should be one of %s", key, Arrays.toString(optionalValues))); } /**
