Github user JoshRosen commented on the pull request:

    https://github.com/apache/spark/pull/3241#issuecomment-62971082
  
    We're throwing a more specific exception class, so I guess that caller code 
doesn't need to change: if the old caller code caught `Exception` then it can 
certainly catch `SparkException` since that's a subclass.  Things would be 
different if we changed this to throw a wider exception type.
    
    I think this compatibility concern is moot, though, since `checkpoint()` 
wasn't declared with the `@throws` Scala annotation, so the generated code 
method won't have any declared exceptions:
    
    ```scala
    scala> import java.io.IOException
    import java.io.IOException
    
    scala> class A {
         |   def foo() {
         |    throw new IOException("error!")
         |   }
         | }
    defined class A
    
    scala> :javap -s A
    Compiled from "<console>"
    public class A {
      public void foo();
        Signature: ()V
    
      public A();
        Signature: ()V
    }
    
    scala> class B {
         |   @throws[IOException]
         |   def foo() {
         |      throw new IOException("error!")
         |   }
         | }
    defined class B
    
    scala> :javap -s B
    Compiled from "<console>"
    public class B {
      public void foo() throws java.io.IOException;
        Signature: ()V
    
      public B();
        Signature: ()V
    }
    ```


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