karenfeng commented on a change in pull request #33573:
URL: https://github.com/apache/spark/pull/33573#discussion_r679309813



##########
File path: core/src/main/scala/org/apache/spark/SparkException.scala
##########
@@ -41,6 +48,30 @@ class SparkException(
   override def getSqlState: String = 
SparkThrowableHelper.getSqlState(errorClass.orNull)
 }
 
+class SparkRuntimeException(
+    message: String,
+    cause: Throwable,

Review comment:
       `cause` is always a type of `Throwable` in the base type and it needs to 
be propagated, so I think we can leave it as is. But I think we can simplify 
this class to only accept `errorClass` and `messageParameters` (and maybe 
`cause` if needed); see `SparkArithmeticException` as an example.




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