Skip to content
Snippets Groups Projects
Commit 6e50429e authored by Emmanouil (Manos) Koukoutos's avatar Emmanouil (Manos) Koukoutos
Browse files

Catch error when processing options

parent 6a7e5e6f
No related branches found
No related tags found
No related merge requests found
......@@ -228,7 +228,24 @@ object Main {
}
// Process options
val ctx = processOptions(realArgs)
val ctx = try {
processOptions(realArgs)
} catch {
case LeonFatalError(None) =>
sys.exit(1)
case LeonFatalError(Some(msg)) =>
// For the special case of fatal errors not sent though Reporter, we
// send them through reporter one time
try {
new DefaultReporter(Settings()).fatalError(msg)
} catch {
case _: LeonFatalError =>
}
sys.exit(1)
}
try {
ctx.interruptManager.registerSignalHandler()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment