diff options
Diffstat (limited to 'sources')
-rw-r--r-- | sources/scala/tools/scalac/Main.scala | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/sources/scala/tools/scalac/Main.scala b/sources/scala/tools/scalac/Main.scala index 86e3b684a7..a7b69c369e 100644 --- a/sources/scala/tools/scalac/Main.scala +++ b/sources/scala/tools/scalac/Main.scala @@ -24,7 +24,9 @@ object Main { val VERSION: String = System.getProperty("scala.version", "unknown version"); - def main(args: Array[String]): unit = { + def main(args: Array[String]): unit = main1( true, args ); + + def main1( exitOnError:boolean, args: Array[String] ):unit = { val reporter = new Reporter(); val command = new CompilerCommand( PRODUCT, VERSION, reporter, new CompilerPhases()); @@ -34,7 +36,9 @@ object Main { global.stop("total"); global.reporter.printSummary(); } - System.exit(if (reporter.errors() > 0) 1 else 0); + if( exitOnError ) { + System.exit(if (reporter.errors() > 0) 1 else 0); + } } } } |