You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@kyuubi.apache.org by GitBox <gi...@apache.org> on 2022/04/24 14:52:26 UTC

[GitHub] [incubator-kyuubi] cxzl25 commented on a diff in pull request #2465: [KYUUBI #2453] [Improvement] checkValue of TypedConfigBuilder shall also print the config name

cxzl25 commented on code in PR #2465:
URL: https://github.com/apache/incubator-kyuubi/pull/2465#discussion_r857138113


##########
kyuubi-common/src/main/scala/org/apache/kyuubi/config/ConfigBuilder.scala:
##########
@@ -136,7 +136,10 @@ private[kyuubi] case class TypedConfigBuilder[T](
   /** Checks if the user-provided value for the config matches the validator. */
   def checkValue(validator: T => Boolean, errMsg: String): TypedConfigBuilder[T] = {
     transform { v =>
-      if (!validator(v)) throw new IllegalArgumentException(errMsg)
+      if (!validator(v)) {
+        throw new IllegalArgumentException(s"The value of ${parent.key} is invalid," +

Review Comment:
   We can refer to [SPARK-35456](https://issues.apache.org/jira/browse/SPARK-35456), also output value.
   
   nit space  `invalid,` ->`invalid, `
   
   



-- 
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: notifications-unsubscribe@kyuubi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For additional commands, e-mail: notifications-help@kyuubi.apache.org