beliefer commented on code in PR #43926: URL: https://github.com/apache/spark/pull/43926#discussion_r1402846847
########## core/src/main/scala/org/apache/spark/errors/SparkCoreErrors.scala: ########## @@ -221,6 +221,18 @@ private[spark] object SparkCoreErrors { new NoSuchElementException(id) } + def sparkJobCancelled(jobId: Int, reason: String, e: Exception): SparkException = { + new SparkException( + errorClass = "SPARK_JOB_CANCELLED", + messageParameters = Map("jobId" -> jobId.toString, "reason" -> reason), + cause = e + ) + } + + def sparkJobCancelledAsPartOfJobGroupError(jobId: Int, jobGroupId: String): SparkException = { + sparkJobCancelled(jobId, s"part of cancelled job group $jobGroupId", null) Review Comment: I'm a bit confused. Does driver exit if throw a spark exception? -- 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: reviews-unsubscr...@spark.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org