HyukjinKwon commented on a change in pull request #32600:
URL: https://github.com/apache/spark/pull/32600#discussion_r636574861



##########
File path: 
core/src/main/scala/org/apache/spark/internal/config/ConfigBuilder.scala
##########
@@ -104,7 +104,7 @@ private[spark] class TypedConfigBuilder[T](
   /** Checks if the user-provided value for the config matches the validator. 
*/
   def checkValue(validator: T => Boolean, errorMsg: String): 
TypedConfigBuilder[T] = {
     transform { v =>
-      if (!validator(v)) throw new IllegalArgumentException(errorMsg)
+      if (!validator(v)) throw new IllegalArgumentException(s"'$v' is invalid 
because: $errorMsg")

Review comment:
       ```suggestion
         if (!validator(v)) throw new IllegalArgumentException(s"'$v' in 
${parent.key} is invalid. $errorMsg")
   ```




-- 
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.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to