Skip to content

Commit

Permalink
[JENKINS-18405] added diagnosis
Browse files Browse the repository at this point in the history
We'd like to know which class is failng to load.
  • Loading branch information
kohsuke committed Jun 26, 2013
1 parent 1aea426 commit b2836fc
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/main/java/hudson/remoting/RemoteClassLoader.java
Original file line number Diff line number Diff line change
Expand Up @@ -704,7 +704,12 @@ public ClassFile fetch2(String className) throws ClassNotFoundException {
* Fetch a single class and creates a {@link ClassFile2} for it.
*/
public ClassFile2 fetch4(String className, ClassFile2 referer) throws ClassNotFoundException {
Class<?> c = (referer==null?this.cl:referer.clazz.getClassLoader()).loadClass(className);
Class<?> c;
try {
c = (referer==null?this.cl:referer.clazz.getClassLoader()).loadClass(className);
} catch (LinkageError e) {
throw (LinkageError)new LinkageError("Failed to load "+className).initCause(e);
}
ClassLoader ecl = c.getClassLoader();
if (ecl == null) {
if (USE_BOOTSTRAP_CLASSLOADER) {
Expand Down

0 comments on commit b2836fc

Please sign in to comment.