diff options
author | Geoffrey Washburn <geoffrey.washburn@epfl.ch> | 2008-02-04 14:30:32 +0000 |
---|---|---|
committer | Geoffrey Washburn <geoffrey.washburn@epfl.ch> | 2008-02-04 14:30:32 +0000 |
commit | 4ce201a6f46bc5fed018723a23968b2f654a46e5 (patch) | |
tree | 7ee3ce7ddeaff949a2b091fb1a5de00253e7fc18 /src | |
parent | 83641e762f4c72d495dec904e79bafbef22b09fd (diff) | |
download | scala-4ce201a6f46bc5fed018723a23968b2f654a46e5.tar.gz scala-4ce201a6f46bc5fed018723a23968b2f654a46e5.tar.bz2 scala-4ce201a6f46bc5fed018723a23968b2f654a46e5.zip |
Should fix #417 (Exit status was zero on except...
Should fix #417 (Exit status was zero on exceptional exits)
Diffstat (limited to 'src')
-rw-r--r-- | src/compiler/scala/tools/nsc/MainGenericRunner.scala | 5 | ||||
-rw-r--r-- | src/compiler/scala/tools/nsc/ScriptRunner.scala | 1 |
2 files changed, 6 insertions, 0 deletions
diff --git a/src/compiler/scala/tools/nsc/MainGenericRunner.scala b/src/compiler/scala/tools/nsc/MainGenericRunner.scala index bb10a39325..9cf28af472 100644 --- a/src/compiler/scala/tools/nsc/MainGenericRunner.scala +++ b/src/compiler/scala/tools/nsc/MainGenericRunner.scala @@ -162,17 +162,22 @@ object MainGenericRunner { } catch { case e: ClassNotFoundException => Console.println(e) + exit(1) case e: NoSuchMethodException => Console.println(e) + exit(1) case e: InvocationTargetException => e.getCause.printStackTrace + exit(1) } + } else { try { ScriptRunner.runScript(settings, thingToRun, command.arguments) } catch { case e: SecurityException => Console.println(e) + exit(1) } } } diff --git a/src/compiler/scala/tools/nsc/ScriptRunner.scala b/src/compiler/scala/tools/nsc/ScriptRunner.scala index 10531a1bf5..78a63b2b23 100644 --- a/src/compiler/scala/tools/nsc/ScriptRunner.scala +++ b/src/compiler/scala/tools/nsc/ScriptRunner.scala @@ -374,6 +374,7 @@ object ScriptRunner { } catch { case e:InvocationTargetException => e.getCause.printStackTrace + exit(1) } } |