Skip to content

Commit 589276a

Browse files
committed
throw fatal error again
1 parent 3c72cd8 commit 589276a

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

core/src/main/scala/org/apache/spark/util/Utils.scala

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1171,11 +1171,15 @@ private[spark] object Utils extends Logging {
11711171
} catch {
11721172
case e: ControlThrowable => throw e
11731173
case t: Throwable =>
1174+
val currentThreadName = Thread.currentThread().getName
11741175
if (sc != null) {
1175-
logError(s"uncaught error in thread ${Thread.currentThread().getName}, stopping " +
1176-
"SparkContext", t)
1176+
logError(s"uncaught error in thread $currentThreadName, stopping SparkContext", t)
11771177
sc.stop()
11781178
}
1179+
if (!NonFatal(t)) {
1180+
logError(s"throw uncaught fatal error in thread $currentThreadName", t)
1181+
throw t
1182+
}
11791183
}
11801184
}
11811185

0 commit comments

Comments
 (0)