From c597b48eda67f9d11ea4f35559864db06892f12d Mon Sep 17 00:00:00 2001 From: Jason Zaugg Date: Mon, 28 Jan 2013 22:29:48 +0100 Subject: [PATCH] Stop using Predef.error We'd like to remove this from 2.11.0. This patch should be backported to 0.12.3. --- compile/interface/src/main/scala/xsbt/Command.scala | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/compile/interface/src/main/scala/xsbt/Command.scala b/compile/interface/src/main/scala/xsbt/Command.scala index 9fa8e2163..457beda66 100644 --- a/compile/interface/src/main/scala/xsbt/Command.scala +++ b/compile/interface/src/main/scala/xsbt/Command.scala @@ -8,19 +8,19 @@ package xsbt object Command { /** - * Construct a CompilerCommand using reflection, to be compatible with Scalac before and after - * r21274 - */ + * Construct a CompilerCommand using reflection, to be compatible with Scalac before and after + * r21274 + */ def apply(arguments: List[String], settings: Settings): CompilerCommand = { def constr(params: Class[_]*) = classOf[CompilerCommand].getConstructor(params: _*) try { constr(classOf[List[_]], classOf[Settings]).newInstance(arguments, settings) } catch { case e: NoSuchMethodException => - constr(classOf[List[_]], classOf[Settings], classOf[Function1[_, _]], classOf[Boolean]).newInstance(arguments, settings, error _, false.asInstanceOf[AnyRef]) + constr(classOf[List[_]], classOf[Settings], classOf[Function1[_, _]], classOf[Boolean]).newInstance(arguments, settings, (s: String) => throw new RuntimeException(s), false.asInstanceOf[AnyRef]) } } def getWarnFatal(settings: Settings): Boolean = settings.Xwarnfatal.value -} \ No newline at end of file +}