cloud-fan commented on code in PR #52256:
URL: https://github.com/apache/spark/pull/52256#discussion_r2342947331


##########
common/utils/src/main/scala/org/apache/spark/ErrorClassesJSONReader.scala:
##########
@@ -46,24 +46,28 @@ class ErrorClassesJsonReader(jsonFileURLs: Seq[URL]) {
       case (key, value) => key -> value
     }
     val sub = new StringSubstitutor(sanitizedParameters)
-    val errorMessage = try {
-      sub.replace(ErrorClassesJsonReader.TEMPLATE_REGEX.replaceAllIn(
-        messageTemplate, "\\$\\{$1\\}"))
-    } catch {
-      case i: IllegalArgumentException => throw SparkException.internalError(
-        s"Undefined error message parameter for error class: '$errorClass', " +
-          s"MessageTemplate: $messageTemplate, " +
-          s"Parameters: $messageParameters", i)
-    }
+    val errorMessage =

Review Comment:
   unnecessary code style change



-- 
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: reviews-unsubscr...@spark.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to