summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2012-05-02 13:25:03 +0200
committerSven Gothel <[email protected]>2012-05-02 13:25:03 +0200
commitbe7cac1713b166ca6578c685ec8a7231a8429919 (patch)
treeb3bcc3a86a27218ea08b4c66a19bdf4f1d531901
parent9ff0b0dafea2a03a915c97eb1513c39c27b6a7ae (diff)
NewtFactory: Show failure in getCustomClass(..) - require both, packagename and classname
-rw-r--r--src/newt/classes/com/jogamp/newt/NewtFactory.java11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/newt/classes/com/jogamp/newt/NewtFactory.java b/src/newt/classes/com/jogamp/newt/NewtFactory.java
index f551fcc83..82f74e370 100644
--- a/src/newt/classes/com/jogamp/newt/NewtFactory.java
+++ b/src/newt/classes/com/jogamp/newt/NewtFactory.java
@@ -58,11 +58,16 @@ public class NewtFactory {
public static Class<?> getCustomClass(String packageName, String classBaseName) {
Class<?> clazz = null;
- if(packageName!=null || classBaseName!=null) {
- String clazzName = packageName + "." + classBaseName ;
+ if(packageName!=null && classBaseName!=null) {
+ final String clazzName = packageName + "." + classBaseName ;
try {
clazz = Class.forName(clazzName);
- } catch (Throwable t) {}
+ } catch (Throwable t) {
+ System.err.println("Warning: Failed to find class <"+clazzName+">: "+t.getMessage());
+ if(DEBUG_IMPLEMENTATION) {
+ t.printStackTrace();
+ }
+ }
}
return clazz;
}