Add valid project IDs to 'No project <x> in <uri>' error message

This commit is contained in:
Mark Harrah 2012-08-30 16:37:56 -04:00
parent 3dd3a18996
commit 9d39b5d9e1
1 changed files with 4 additions and 2 deletions

View File

@ -341,8 +341,10 @@ object Load
{
val ProjectRef(refURI, refID) = Scope.resolveProjectRef(uri, rootProject, ref)
val loadedUnit = builds(refURI)
if(! (loadedUnit.defined contains refID) )
error("No project '" + refID + "' in '" + refURI + "'")
if(! (loadedUnit.defined contains refID) ) {
val projectIDs = loadedUnit.defined.keys.toSeq.sorted
error("No project '" + refID + "' in '" + refURI + "'.\nValid project IDs: " + projectIDs.mkString(", "))
}
}
}