[Nice-commit] Nice/src/nice/tools/code TypeImport.java,1.8,1.9
Brought to you by:
bonniot
From: Arjan B. <ar...@us...> - 2004-11-06 20:40:19
|
Update of /cvsroot/nice/Nice/src/nice/tools/code In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32385/F:/nice/src/nice/tools/code Modified Files: TypeImport.java Log Message: Handling of classloading exceptions. (patch by Luc Perrin) Index: TypeImport.java =================================================================== RCS file: /cvsroot/nice/Nice/src/nice/tools/code/TypeImport.java,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** TypeImport.java 4 Jul 2004 02:01:42 -0000 1.8 --- TypeImport.java 6 Nov 2004 20:00:56 -0000 1.9 *************** *** 154,165 **** Class c = null; ! try{ ! c = classLoader.loadClass(className); } catch(ClassNotFoundException e) {} // The class does not exist. ! catch(NoClassDefFoundError e){} // idem stringToReflectClass.put(className, c); ! return c; } --- 154,174 ---- Class c = null; ! try { ! c = classLoader.loadClass(className); } catch(ClassNotFoundException e) {} // The class does not exist. ! catch(NoClassDefFoundError e) ! { ! User.error("Class "+className+" depends on class "+ ! e.getMessage().replace( '/', '.' ) + " which is not available on the classpath." ); ! } ! catch(UnsupportedClassVersionError e) ! { ! User.error("Class "+className+" could not be loaded. The version of its class "+ ! "file is not supported by the running JVM." ); ! } stringToReflectClass.put(className, c); ! return c; } |