You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@heron.apache.org by GitBox <gi...@apache.org> on 2018/05/17 18:17:02 UTC

[GitHub] nlu90 closed pull request #2870: Add extra info when failed to create new instance of class

nlu90 closed pull request #2870: Add extra info when failed to create new instance of class
URL: https://github.com/apache/incubator-heron/pull/2870
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/storm-compatibility/src/java/backtype/storm/utils/Utils.java b/storm-compatibility/src/java/backtype/storm/utils/Utils.java
index 696956f3f4..a05bed58b0 100644
--- a/storm-compatibility/src/java/backtype/storm/utils/Utils.java
+++ b/storm-compatibility/src/java/backtype/storm/utils/Utils.java
@@ -38,7 +38,7 @@ public static Object newInstance(String klass) {
       Class<?> c = Class.forName(klass);
       return c.newInstance();
     } catch (ClassNotFoundException | InstantiationException | IllegalAccessException e) {
-      throw new RuntimeException(e);
+      throw new RuntimeException("Failed to create instance for class: " + klass, e);
     }
   }
 
diff --git a/storm-compatibility/src/java/org/apache/storm/utils/Utils.java b/storm-compatibility/src/java/org/apache/storm/utils/Utils.java
index d67af5ed55..a30a77d211 100644
--- a/storm-compatibility/src/java/org/apache/storm/utils/Utils.java
+++ b/storm-compatibility/src/java/org/apache/storm/utils/Utils.java
@@ -38,7 +38,7 @@ public static Object newInstance(String klass) {
       Class<?> c = Class.forName(klass);
       return c.newInstance();
     } catch (ClassNotFoundException | InstantiationException | IllegalAccessException e) {
-      throw new RuntimeException(e);
+      throw new RuntimeException("Failed to create instance for class: " + klass, e);
     }
   }
 


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services