liunaijie commented on code in PR #10592:
URL: https://github.com/apache/seatunnel/pull/10592#discussion_r2937962830
##########
seatunnel-api/src/main/java/org/apache/seatunnel/api/configuration/util/ConfigValidator.java:
##########
@@ -124,14 +135,22 @@ private List<Option<?>> getAbsentOptions(List<Option<?>>
requiredOption) {
return absent;
}
- void validate(RequiredOption.AbsolutelyRequiredOptions requiredOption) {
+ void validate(RequiredOption.AbsolutelyRequiredOptions requiredOption,
Expression expression) {
List<Option<?>> absentOptions =
getAbsentOptions(requiredOption.getRequiredOption());
if (absentOptions.size() == 0) {
return;
}
throw new OptionValidationException(
- "There are unconfigured options, the options(%s) are
required.",
- getOptionKeys(absentOptions));
+ "There are unconfigured options, the options(%s) are
required%s",
+ getOptionKeys(absentOptions),
getExpressionExceptionHintMessage(expression));
+ }
Review Comment:
Much appreciated for the meticulous review.
This parameter is only needed for `AbsolutelyRequiredOptions` to improve
error clarity, use to explain why an optional parameter has become mandatory in
a specific scenario.
While `BundledRequiredOptions` already provides enough context in its error
message, also for other types.
--
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]