Don't mark ExceptionInInitializerError as incompatible plugins: rethrow the cause instead. Fixes #1007.

This commit is contained in:
Mark Harrah 2013-11-25 21:03:40 -05:00
parent 5f7a327e5e
commit 13041bfb9a
1 changed files with 6 additions and 1 deletions

View File

@ -610,7 +610,12 @@ object Load
val names = getPluginNames(data.classpath, loader)
val loaded =
try loadPlugins(loader, names)
catch { case e: LinkageError => incompatiblePlugins(data, e) }
catch {
case e: ExceptionInInitializerError =>
val cause = e.getCause
if(cause eq null) throw e else throw cause
case e: LinkageError => incompatiblePlugins(data, e)
}
(names, loaded)
}
new sbt.LoadedPlugins(dir, data, loader, plugins, pluginNames)