Trap unnecessary launcher stack trace / invocation exception

This commit is contained in:
Alexandre Archambault 2016-07-23 17:17:15 +02:00
parent 84ce09ab43
commit 97bdd1f77d
No known key found for this signature in database
GPG Key ID: 14640A6839C263A9
1 changed files with 5 additions and 1 deletions

View File

@ -207,5 +207,9 @@ case class Launch(
Helper.errPrintln(s"Launching")
Thread.currentThread().setContextClassLoader(loader)
method.invoke(null, userArgs.toArray)
try method.invoke(null, userArgs.toArray)
catch {
case e: java.lang.reflect.InvocationTargetException =>
throw Option(e.getCause).getOrElse(e)
}
}