1
0

Print a better error on missing config classes

Without this you don't actually see what config class you tried to use, which
makes it hard to grep around Makefiles to see why things are broken.
This commit is contained in:
Palmer Dabbelt 2016-02-05 09:59:02 -08:00
parent 8422aaf6fc
commit b2ed35e8aa

View File

@ -136,8 +136,8 @@ object TestGenerator extends App with FileSystemUtilities {
Class.forName(s"$projectName.$configClassName").newInstance.asInstanceOf[Config]
} catch {
case e: java.lang.ClassNotFoundException =>
throwException(s"Could not find the cde.Config subclass you asked for " +
"(i.e. \"$configClassName\"), did you misspell it?", e)
throwException("Unable to find configClassName \"" + configClassName +
"\", did you misspell it?", e)
}
val world = config.toInstance
val paramsFromConfig: Parameters = Parameters.root(world)