Skip to content

Conversation

@dimfeld
Copy link
Contributor

@dimfeld dimfeld commented Sep 11, 2015

When throwing an IllegalArgumentException in SnappyCompressionCodec.init, chain the existing exception. This allows potentially important debugging info to be passed to the user.

Manual testing shows the exception chained properly, and the test suite still looks fine as well.

This contribution is my original work and I license the work to the project under the project's open source license.

When throwing an IllegalArgumentException in SnappyCompressionCodec.init, chain the existing exception. This allows potentially important debugging info to be passed to the user.

Fixes [SPARK-10566]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks fine to me. I can see why just not catching the Error and letting it fly works as well. For now, fine to just preserve the same behavior but chain the cause.

@SparkQA
Copy link

SparkQA commented Sep 11, 2015

Test build #1744 has finished for PR 8725 at commit 16bf56d.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds the following public classes (experimental):
    • class MultilayerPerceptronClassifier(JavaEstimator, HasFeaturesCol, HasLabelCol, HasPredictionCol,
    • class MultilayerPerceptronClassificationModel(JavaModel):
    • class MinMaxScaler(JavaEstimator, HasInputCol, HasOutputCol):
    • class MinMaxScalerModel(JavaModel):
    • ("thresholds", "Thresholds in multi-class classification to adjust the probability of " +
    • class HasElasticNetParam(Params):
    • class HasFitIntercept(Params):
    • class HasStandardization(Params):
    • class HasThresholds(Params):
    • thresholds = Param(Params._dummy(), "thresholds", "Thresholds in multi-class classification to adjust the probability of predicting each class. Array must have length equal to the number of classes, with values >= 0. The class with largest value p/t is predicted, where p is the original probability of that class and t is the class' threshold.")
    • self.thresholds = Param(self, "thresholds", "Thresholds in multi-class classification to adjust the probability of predicting each class. Array must have length equal to the number of classes, with values >= 0. The class with largest value p/t is predicted, where p is the original probability of that class and t is the class' threshold.")

asfgit pushed a commit that referenced this pull request Sep 12, 2015
…asks important error information

When throwing an IllegalArgumentException in SnappyCompressionCodec.init, chain the existing exception. This allows potentially important debugging info to be passed to the user.

Manual testing shows the exception chained properly, and the test suite still looks fine as well.

This contribution is my original work and I license the work to the project under the project's open source license.

Author: Daniel Imfeld <[email protected]>

Closes #8725 from dimfeld/dimfeld-patch-1.

(cherry picked from commit 6d83678)
Signed-off-by: Sean Owen <[email protected]>
@asfgit asfgit closed this in 6d83678 Sep 12, 2015
ashangit pushed a commit to ashangit/spark that referenced this pull request Oct 19, 2016
…asks important error information

When throwing an IllegalArgumentException in SnappyCompressionCodec.init, chain the existing exception. This allows potentially important debugging info to be passed to the user.

Manual testing shows the exception chained properly, and the test suite still looks fine as well.

This contribution is my original work and I license the work to the project under the project's open source license.

Author: Daniel Imfeld <[email protected]>

Closes apache#8725 from dimfeld/dimfeld-patch-1.

(cherry picked from commit 6d83678)
Signed-off-by: Sean Owen <[email protected]>
(cherry picked from commit 5bf403c)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants