simplified.

git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@1943 71c3de6d-444a-0410-be80-ed276b4c234a
This commit is contained in:
kohsuke committed 2007-01-26 14:11:16 +00:00
1 parent 99e5bde609
commit eb23404674
1 file changed
+4 -12
+4 -12
View File
@@ -184,17 +184,11 @@ public final class PluginWrapper {
this.plugin = (Plugin)plugin;
this.plugin.wrapper = this;
} catch (ClassNotFoundException e) {
IOException ioe = new IOException("Unable to load " + className + " from " + archive);
ioe.initCause(e);
throw ioe;
throw new IOException2("Unable to load " + className + " from " + archive,e);
} catch (IllegalAccessException e) {
IOException ioe = new IOException("Unable to create instance of " + className + " from " + archive);
ioe.initCause(e);
throw ioe;
throw new IOException2("Unable to create instance of " + className + " from " + archive,e);
} catch (InstantiationException e) {
IOException ioe = new IOException("Unable to create instance of " + className + " from " + archive);
ioe.initCause(e);
throw ioe;
throw new IOException2("Unable to create instance of " + className + " from " + archive,e);
}
// initialize plugin
@@ -203,9 +197,7 @@ public final class PluginWrapper {
plugin.start();
} catch(Throwable t) {
// gracefully handle any error in plugin.
IOException ioe = new IOException("Failed to initialize");
ioe.initCause(t);
throw ioe;
throw new IOException2("Failed to initialize",t);
}
} finally {
Thread.currentThread().setContextClassLoader(old);