Github user vanzin commented on a diff in the pull request:

    https://github.com/apache/spark/pull/4773#discussion_r25389917
  
    --- Diff: 
yarn/src/main/scala/org/apache/spark/deploy/yarn/ApplicationMaster.scala ---
    @@ -483,14 +483,14 @@ private[spark] class ApplicationMaster(
             } catch {
               case e: InvocationTargetException =>
                 e.getCause match {
    -              case _: InterruptedException =>
    +              case e: InterruptedException =>
                     // Reporter thread can interrupt to stop user class
    -              case e: Exception =>
    +              case _ =>
    --- End diff --
    
    So, the problem is that this was not catching `Error`, but just 
`Exception`, right?
    
    I think this generates a compiler warning, so probably should be `case _: 
Throwable =>`. And you can avoid the duplicate `getCause` calls by giving this 
variable a name instead of using the placeholder.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to