From 08312b9c2e15d2d77076274a8fcf7f3f565de38e Mon Sep 17 00:00:00 2001 From: Alexandre Archambault Date: Sat, 23 Jan 2016 15:42:07 +0100 Subject: [PATCH] Catch NoSuchMethodExceptions in launcher Fixes https://github.com/alexarchambault/coursier/issues/76 --- cli/src/main/scala-2.11/coursier/cli/Coursier.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cli/src/main/scala-2.11/coursier/cli/Coursier.scala b/cli/src/main/scala-2.11/coursier/cli/Coursier.scala index b1f0a8cae..b010e28d5 100644 --- a/cli/src/main/scala-2.11/coursier/cli/Coursier.scala +++ b/cli/src/main/scala-2.11/coursier/cli/Coursier.scala @@ -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) }