mirror of https://github.com/sbt/sbt.git
Revert change that exited on exception in main thread (that behavior is a Scala runner bug)
git-svn-id: https://simple-build-tool.googlecode.com/svn/trunk@867 d89573ee-9141-11dd-94d4-bdf5e562f29c
This commit is contained in:
parent
da85255f8e
commit
f8489a77c5
|
|
@ -30,13 +30,7 @@ object TrapExit
|
|||
val originalThreads = allThreads
|
||||
val code = new ExitCode
|
||||
val customThreadGroup = new ExitThreadGroup(new ExitHandler(Thread.getDefaultUncaughtExceptionHandler, originalThreads, code, log))
|
||||
val executionThread =
|
||||
new Thread(customThreadGroup, "run-main")
|
||||
{
|
||||
override def run(): Unit =
|
||||
try { execute }
|
||||
catch { case e => log.trace(e); System.exit(1) } // an exception in the main thread causes the whole program to terminate
|
||||
}
|
||||
val executionThread = new Thread(customThreadGroup, "run-main") { override def run() { execute } }
|
||||
|
||||
val originalSecurityManager = System.getSecurityManager
|
||||
try
|
||||
|
|
|
|||
Loading…
Reference in New Issue