spark-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From JoshRosen <>
Subject [GitHub] spark pull request: [SPARK-4379][Core] Change Exception to SparkEx...
Date Thu, 13 Nov 2014 21:40:27 GMT
Github user JoshRosen commented on the pull request:
    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
    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
    scala> import
    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;
        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 or file a JIRA ticket
with INFRA.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message