Catch NoSuchMethodExceptions in launcher

Fixes https://github.com/alexarchambault/coursier/issues/76
This commit is contained in:
Alexandre Archambault 2016-01-23 15:42:07 +01:00
parent 58e6375c33
commit 08312b9c2e
1 changed files with 1 additions and 1 deletions

View File

@ -320,7 +320,7 @@ case class Launch(
}
val method =
try cls.getMethod("main", classOf[Array[String]])
catch { case e: NoSuchMethodError =>
catch { case e: NoSuchMethodException =>
Helper.errPrintln(s"Error: method main not found in $mainClass0")
sys.exit(255)
}