yaooqinn commented on code in PR #33934:
URL: https://github.com/apache/spark/pull/33934#discussion_r1517423466
##########
common/utils/src/main/scala/org/apache/spark/SparkException.scala:
##########
@@ -145,8 +145,9 @@ private[spark] class SparkDriverExecutionException(cause:
Throwable)
* Exception thrown when the main user code is run as a child process (e.g.
pyspark) and we want
* the parent SparkSubmit process to exit with the same exit code.
*/
-private[spark] case class SparkUserAppException(exitCode: Int)
- extends SparkException(s"User application exited with $exitCode")
+private[spark] case class SparkUserAppException(exitCode: Int, errorMsg:
Option[String] = None)
+ extends SparkException(s"User application exited with $exitCode" +
+ s"${errorMsg.map(error => s" and caused by\n$error").getOrElse("")}")
Review Comment:
```suggestion
errorMsg.map(error => s" and caused by\n$error").getOrElse(""))
```
--
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]