MaxGekk commented on code in PR #37834:
URL: https://github.com/apache/spark/pull/37834#discussion_r968279188


##########
core/src/main/scala/org/apache/spark/SparkException.scala:
##########
@@ -322,65 +349,59 @@ private[spark] class SparkIllegalArgumentException(
 private[spark] class SparkIndexOutOfBoundsException(
     errorClass: String,
     errorSubClass: Option[String] = None,
-    messageParameters: Array[String])
+    messageParameters: Map[String, String])
   extends IndexOutOfBoundsException(
     SparkThrowableHelper.getMessage(errorClass, errorSubClass.orNull, 
messageParameters))
-    with SparkThrowable {
+  with SparkThrowable {
 
-  override def getMessageParameters: Array[String] = messageParameters
-  override def getErrorClass: String = errorClass
-  override def getErrorSubClass: String = errorSubClass.orNull
-}
-
-/**
- * IO exception thrown from Spark with an error class.
- */
-private[spark] class SparkIOException(
-    errorClass: String,
-    errorSubClass: Option[String] = None,
-    messageParameters: Array[String])
-  extends IOException(
-    SparkThrowableHelper.getMessage(errorClass, errorSubClass.orNull, 
messageParameters))
-    with SparkThrowable {
+  override def getMessageParameters: Array[String] = {
+    SparkThrowableHelper.getMessageParameters(errorClass, 
errorSubClass.orNull, messageParameters)
+  }
 
-  override def getMessageParameters: Array[String] = messageParameters
   override def getErrorClass: String = errorClass
   override def getErrorSubClass: String = errorSubClass.orNull
 }
 
 private[spark] class SparkRuntimeException(
     errorClass: String,
     errorSubClass: Option[String] = None,
-    messageParameters: Array[String],
+    messageParameters: Map[String, String],

Review Comment:
   This one is tested in many places.



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


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

Reply via email to