Skip to content

Commit

Permalink
throw fatal error again
Browse files Browse the repository at this point in the history
  • Loading branch information
CodingCat committed Mar 18, 2015
1 parent 3c72cd8 commit 589276a
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions core/src/main/scala/org/apache/spark/util/Utils.scala
Original file line number Diff line number Diff line change
Expand Up @@ -1171,11 +1171,15 @@ private[spark] object Utils extends Logging {
} catch {
case e: ControlThrowable => throw e
case t: Throwable =>
val currentThreadName = Thread.currentThread().getName
if (sc != null) {
logError(s"uncaught error in thread ${Thread.currentThread().getName}, stopping " +
"SparkContext", t)
logError(s"uncaught error in thread $currentThreadName, stopping SparkContext", t)
sc.stop()
}
if (!NonFatal(t)) {
logError(s"throw uncaught fatal error in thread $currentThreadName", t)
throw t
}
}
}

Expand Down

0 comments on commit 589276a

Please sign in to comment.