Skip to content

Commit

Permalink
Don't mark ExceptionInInitializerError as incompatible plugins: rethr…
Browse files Browse the repository at this point in the history
…ow the cause instead. Fixes #1007.
  • Loading branch information
harrah authored and eed3si9n committed Mar 21, 2014
1 parent 31d959c commit 113c407
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion main/src/main/scala/sbt/Load.scala
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 113c407

Please sign in to comment.