Skip to content

Commit

Permalink
[JENKINS-8744] improving error diagnosis so that we can pin-point exa…
Browse files Browse the repository at this point in the history
…ctly which class is failing to load.
  • Loading branch information
kohsuke committed Sep 17, 2011
1 parent e527238 commit 220e39d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/main/java/hudson/remoting/RemoteClassLoader.java
Expand Up @@ -148,7 +148,11 @@ private Class<?> loadClassFile(String name, byte[] bytes) {
// define package
definePackage(name);

return defineClass(name, bytes, 0, bytes.length);
try {
return defineClass(name, bytes, 0, bytes.length);
} catch (ClassFormatError e) {
throw (ClassFormatError)new ClassFormatError("Failed to load "+name).initCause(e);
}
}

/**
Expand Down

0 comments on commit 220e39d

Please sign in to comment.