From be7cac1713b166ca6578c685ec8a7231a8429919 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Wed, 2 May 2012 13:25:03 +0200 Subject: NewtFactory: Show failure in getCustomClass(..) - require both, packagename and classname --- src/newt/classes/com/jogamp/newt/NewtFactory.java | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'src/newt') 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; } -- cgit v1.2.3