From f5e9b99677fdc37b52c08c42cd586e4db59c5513 Mon Sep 17 00:00:00 2001 From: Mark Harrah Date: Sat, 6 Feb 2010 17:43:14 -0500 Subject: [PATCH] Throw a custom exception when there is an Ivy resolve error --- ivy/IvyActions.scala | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ivy/IvyActions.scala b/ivy/IvyActions.scala index 88bd731cf..6eb2705a4 100644 --- a/ivy/IvyActions.scala +++ b/ivy/IvyActions.scala @@ -134,6 +134,7 @@ object IvyActions resolveOptions.setLog(LogOptions.LOG_DOWNLOAD_ONLY) val resolveReport = ivy.resolve(module, resolveOptions) if(resolveReport.hasError) - error(Set(resolveReport.getAllProblemMessages.toArray: _*).mkString("\n")) + throw new ResolveException(resolveReport.getAllProblemMessages.toArray.map(_.toString).toList.removeDuplicates) } -} \ No newline at end of file +} +final class ResolveException(messages: List[String]) extends RuntimeException(messages.mkString("\n")) \ No newline at end of file