cloud-fan commented on code in PR #36693:
URL: https://github.com/apache/spark/pull/36693#discussion_r891301726
##########
core/src/main/scala/org/apache/spark/ErrorInfo.scala:
##########
@@ -73,18 +73,20 @@ private[spark] object SparkThrowableHelper {
def getMessage(
errorClass: String,
+ errorSubClass: Option[String],
Review Comment:
since the error class name will never contain dots, how about we simplify
the API and ask the caller side to pass `ERROR_CLASS.SUB_CLASS` as the
`errorClass` parameter? e.g.
```
val errorClassArray = errorClass.split("\.")
... if (errorInfo.subClass.isEmpty) {
assert(errorClassArray.length == 1)
(errorClassArray.head, ...)
} else {
assert(errorClassArray.length == 2)
...
}
```
--
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]