diff --git a/common/utils/src/main/scala/org/apache/spark/ErrorClassesJSONReader.scala b/common/utils/src/main/scala/org/apache/spark/ErrorClassesJSONReader.scala index 0dea70679a660..e2dd0da1aac85 100644 --- a/common/utils/src/main/scala/org/apache/spark/ErrorClassesJSONReader.scala +++ b/common/utils/src/main/scala/org/apache/spark/ErrorClassesJSONReader.scala @@ -64,10 +64,10 @@ class ErrorClassesJsonReader(jsonFileURLs: Seq[URL]) { val placeHoldersNum = ErrorClassesJsonReader.TEMPLATE_REGEX.findAllIn(messageTemplate).length if (placeHoldersNum < sanitizedParameters.size) { throw SparkException.internalError( - s"Found unused message parameters for the error class $errorClass. " + - s"Its error message format has $placeHoldersNum place holders, " + + s"Found unused message parameters of the error class '$errorClass'. " + + s"Its error message format has $placeHoldersNum placeholders, " + s"but the passed message parameters map has ${sanitizedParameters.size} items. " + - "Consider to add place holders to the error format or remove unused message parameters.") + "Consider to add placeholders to the error format or remove unused message parameters.") } } errorMessage diff --git a/core/src/test/scala/org/apache/spark/SparkThrowableSuite.scala b/core/src/test/scala/org/apache/spark/SparkThrowableSuite.scala index 3c6d368c30d19..269438d9a6b07 100644 --- a/core/src/test/scala/org/apache/spark/SparkThrowableSuite.scala +++ b/core/src/test/scala/org/apache/spark/SparkThrowableSuite.scala @@ -527,9 +527,9 @@ class SparkThrowableSuite extends SparkFunSuite { errorClass = "INTERNAL_ERROR", parameters = Map( "message" -> - ("Found unused message parameters for the error class CANNOT_UP_CAST_DATATYPE. " + - "Its error message format has 4 place holders, but the passed message parameters map " + - "has 5 items. Consider to add place holders to the error format or " + + ("Found unused message parameters of the error class 'CANNOT_UP_CAST_DATATYPE'. " + + "Its error message format has 4 placeholders, but the passed message parameters map " + + "has 5 items. Consider to add placeholders to the error format or " + "remove unused message parameters.") ) )