srowen commented on code in PR #38896:
URL: https://github.com/apache/spark/pull/38896#discussion_r1039687033
##########
core/src/main/scala/org/apache/spark/SparkException.scala:
##########
@@ -87,6 +87,16 @@ object SparkException {
messageParameters = Map("message" -> msg),
cause = cause)
}
+
+ /**
+ * Tests an condition, throwing an `SparkException` with
+ * the error class `INTERNAL_ERROR` if false.
+ */
+ def checkInternalError(condition: Boolean, msg: String): Unit = {
Review Comment:
Is this tiny utility method worth it? not sure
--
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]