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:
parent
91672b5ee3
commit
ffaac4d3cf
|
@ -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)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -374,6 +374,7 @@ object ScriptRunner {
|
||||||
} catch {
|
} catch {
|
||||||
case e:InvocationTargetException =>
|
case e:InvocationTargetException =>
|
||||||
e.getCause.printStackTrace
|
e.getCause.printStackTrace
|
||||||
|
exit(1)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue