Skip to content

Commit 52c22ba

Browse files
committed
Only catch NonFatal exceptions.
1 parent 361e962 commit 52c22ba

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

core/src/main/scala/org/apache/spark/scheduler/DAGScheduler.scala

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ import scala.concurrent.Await
2626
import scala.concurrent.duration._
2727
import scala.language.postfixOps
2828
import scala.reflect.ClassTag
29+
import scala.util.control.NonFatal
2930

3031
import akka.actor._
3132
import akka.actor.OneForOneStrategy
@@ -768,7 +769,7 @@ class DAGScheduler(
768769
abortStage(stage, "Task not serializable: " + e.toString)
769770
runningStages -= stage
770771
return
771-
case e: Throwable => // Other exceptions, such as IllegalArgumentException from Kryo.
772+
case NonFatal(e) => // Other exceptions, such as IllegalArgumentException from Kryo.
772773
abortStage(stage, "Task serialization failed: " + e.toString)
773774
runningStages -= stage
774775
return

0 commit comments

Comments
 (0)