diff options
author | Christopher Vogt <oss.nsp@cvogt.org> | 2016-06-19 22:19:39 -0400 |
---|---|---|
committer | Christopher Vogt <oss.nsp@cvogt.org> | 2016-09-12 16:00:26 +0100 |
commit | ede10d4d0e139eb8f831b7241d29fb82d8996e73 (patch) | |
tree | 18e63106b4bd537c11f900f89d573cb9b73cb415 /stage2/BuildBuild.scala | |
parent | d7e7265c5509a389f7fbdba77bdc668d6d602a7c (diff) | |
download | cbt-ede10d4d0e139eb8f831b7241d29fb82d8996e73.tar.gz cbt-ede10d4d0e139eb8f831b7241d29fb82d8996e73.tar.bz2 cbt-ede10d4d0e139eb8f831b7241d29fb82d8996e73.zip |
better error message for missing build.scala and missing class Build
Diffstat (limited to 'stage2/BuildBuild.scala')
-rw-r--r-- | stage2/BuildBuild.scala | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/stage2/BuildBuild.scala b/stage2/BuildBuild.scala index b6d92c4..b230b01 100644 --- a/stage2/BuildBuild.scala +++ b/stage2/BuildBuild.scala @@ -54,15 +54,17 @@ trait BuildBuild extends BaseBuild{ .newInstance(managedContext) } catch { case e: ClassNotFoundException if e.getMessage == lib.buildClassName => - throw new Exception("You need to remove the directory or define a class Build in: "+context.projectDirectory) + throw new Exception("You need to define a class Build in build.scala in: "+context.projectDirectory) } } + } else if( projectDirectory.listFiles.exists( _.getName.endsWith(".scala") ) ){ + throw new Exception( + "No file build.scala (lower case) found in " ++ projectDirectory.getPath + ) + } else if( projectDirectory.getParentFile.getName == "build" ){ + new BasicBuild( managedContext ) with BuildBuild } else { - if( projectDirectory.getParentFile.getName == "build" ){ - new BasicBuild( managedContext ) with BuildBuild - } else { - new BasicBuild( managedContext ) - } + new BasicBuild( managedContext ) } ) try{ |