Should fix #417 (Exit status was zero on exceptional exits)

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@13878 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
This commit is contained in:
washburn 2008-02-04 14:30:32 +00:00
parent 91672b5ee3
commit ffaac4d3cf
2 changed files with 6 additions and 0 deletions

View File

@ -162,17 +162,22 @@ object MainGenericRunner {
} catch { } catch {
case e: ClassNotFoundException => case e: ClassNotFoundException =>
Console.println(e) Console.println(e)
exit(1)
case e: NoSuchMethodException => case e: NoSuchMethodException =>
Console.println(e) Console.println(e)
exit(1)
case e: InvocationTargetException => case e: InvocationTargetException =>
e.getCause.printStackTrace e.getCause.printStackTrace
exit(1)
} }
} else { } else {
try { try {
ScriptRunner.runScript(settings, thingToRun, command.arguments) ScriptRunner.runScript(settings, thingToRun, command.arguments)
} catch { } catch {
case e: SecurityException => case e: SecurityException =>
Console.println(e) Console.println(e)
exit(1)
} }
} }
} }

View File

@ -374,6 +374,7 @@ object ScriptRunner {
} catch { } catch {
case e:InvocationTargetException => case e:InvocationTargetException =>
e.getCause.printStackTrace e.getCause.printStackTrace
exit(1)
} }
} }