Add support for a deep reload where the configuration is reread

This commit is contained in:
Mark Harrah 2010-01-12 18:52:14 -05:00
parent 67f8fc5c06
commit 200581abc0
2 changed files with 17 additions and 1 deletions

View File

@ -12,16 +12,21 @@ object Boot
{
System.clearProperty("scala.home") // avoid errors from mixing Scala versions in the same JVM
CheckProxy()
run(args)
System.exit(0)
}
def run(args: Array[String])
{
try { Launch(args.toList) }
catch
{
case b: BootException => errorAndExit(b.toString)
case r: xsbti.RetrieveException =>errorAndExit("Error: " + r.getMessage)
case r: xsbti.FullReload => run(r.arguments)
case e =>
e.printStackTrace
errorAndExit(Pre.prefixError(e.toString))
}
System.exit(0)
}
private def errorAndExit(msg: String)
{

View File

@ -0,0 +1,11 @@
package xsbti;
public final class FullReload extends RuntimeException
{
private final String[] arguments;
public FullReload(String[] arguments)
{
this.arguments = arguments;
}
public String[] arguments() { return arguments; }
}