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
+}