mirror of https://github.com/sbt/sbt.git
Merge pull request #2091 from Duhemm/hide-stacktrace
Don't show the stack trace on compilation error in build definition
This commit is contained in:
commit
d2fdfb81a0
|
|
@ -478,7 +478,17 @@ object BuiltinCommands {
|
|||
val (s1, base) = Project.loadAction(SessionVar.clear(s0), action)
|
||||
IO.createDirectory(base)
|
||||
val s = if (s1 has Keys.stateCompilerCache) s1 else registerCompilerCache(s1)
|
||||
val (eval, structure) = Load.defaultLoad(s, base, s.log, Project.inPluginProject(s), Project.extraBuilds(s))
|
||||
|
||||
val (eval, structure) =
|
||||
try Load.defaultLoad(s, base, s.log, Project.inPluginProject(s), Project.extraBuilds(s))
|
||||
catch {
|
||||
case ex: compiler.EvalException =>
|
||||
s0.log.debug(ex.getMessage)
|
||||
ex.getStackTrace map (ste => s"\tat $ste") foreach (s0.log.debug(_))
|
||||
ex.setStackTrace(Array.empty)
|
||||
throw ex
|
||||
}
|
||||
|
||||
val session = Load.initialSession(structure, eval, s0)
|
||||
SessionSettings.checkSession(session, s)
|
||||
Project.setProject(session, structure, s)
|
||||
|
|
|
|||
|
|
@ -0,0 +1,12 @@
|
|||
|
||||
[@Duhemm]: http://github.com/Duhemm
|
||||
[2071]: https://github.com/sbt/sbt/issues/2071
|
||||
[2091]: https://github.com/sbt/sbt/pull/2091
|
||||
|
||||
### Fixes with compatibility implications
|
||||
|
||||
### Improvements
|
||||
|
||||
- Hide the stack trace on compilation error in build definition [#2071][2071]/[#2091][2091] by [@Duhemm][@Duhemm]
|
||||
|
||||
### Bug fixes
|
||||
Loading…
Reference in New Issue