Throw a custom exception when there is an Ivy resolve error

This commit is contained in:
Mark Harrah 2010-02-06 17:43:14 -05:00
parent 5c37531d23
commit f5e9b99677
1 changed files with 3 additions and 2 deletions

View File

@ -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)
}
}
}
final class ResolveException(messages: List[String]) extends RuntimeException(messages.mkString("\n"))