mridulm commented on code in PR #44080:
URL: https://github.com/apache/spark/pull/44080#discussion_r1412698066


##########
core/src/main/scala/org/apache/spark/scheduler/AsyncEventQueue.scala:
##########
@@ -136,7 +139,9 @@ private class AsyncEventQueue(
    */
   private[scheduler] def stop(): Unit = {
     if (!started.get()) {
-      throw new IllegalStateException(s"Attempted to stop $name that has not 
yet started!")
+      throw new SparkIllegalStateException(
+        errorClass = "SCHEDULER_ASYNC_STOP",
+        messageParameters = Map("name" -> name.toString))
     }

Review Comment:
   We can avoid these sort of off error classes - particularly for cases which 
are not due to user input, but due to internal state of spark.



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