From 96e471f914803f00dc646ebb05de24ede79227a4 Mon Sep 17 00:00:00 2001 From: Christopher Vogt Date: Thu, 15 Jun 2017 23:47:20 -0400 Subject: minor fix to error messages --- cbt | 2 +- compatibility/BuildInterface.java | 2 +- compatibility/Context.java | 8 ++++---- compatibility/Dependency.java | 6 +++--- stage2/DirectoryDependency.scala | 2 +- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/cbt b/cbt index e2014ec..1733077 100755 --- a/cbt +++ b/cbt @@ -204,7 +204,7 @@ if [ $nailgun_installed -eq 1 ] || [ "$1" = "publishSigned" ]; then use_nailgun=1 fi -if [ $server_up -eq 0 ] && [ ! "$DEBUG" == "" ]; then +if [ $use_nailgun -eq 0 ] && [ $server_up -eq 0 ] && [ ! "$DEBUG" == "" ]; then echo "Can't use \`-debug\` (without \`direct\`) when nailgun is already running. If you started it up with \`-debug\` you can still connect to it. Otherwise use \`cbt kill\` to kill it." exit 1 fi diff --git a/compatibility/BuildInterface.java b/compatibility/BuildInterface.java index c374d5d..0428721 100644 --- a/compatibility/BuildInterface.java +++ b/compatibility/BuildInterface.java @@ -13,7 +13,7 @@ public interface BuildInterface extends Dependency{ // deprecated methods, which clients are still allowed to implement, but not required public default BuildInterface finalBuild(){ - throw new IncompatibleCbtVersionException("You need to define method classLoader."); + throw new IncompatibleCbtVersionException("You need to override this method."); }; // needed to propagage through build builds. Maybe we can get rid of this. public abstract BuildInterface copy(Context context); public abstract String scalaVersion(); diff --git a/compatibility/Context.java b/compatibility/Context.java index f0fa42c..218fcd7 100644 --- a/compatibility/Context.java +++ b/compatibility/Context.java @@ -7,16 +7,16 @@ import java.util.concurrent.*; public interface Context{ // recently added methods that needs default values for old versions to work public default long cbtLastModified(){ - throw new IncompatibleCbtVersionException("You need to define method cbtLastModified."); + throw new IncompatibleCbtVersionException("You need to override this method."); }; public default Map persistentCache(){ - throw new IncompatibleCbtVersionException("You need to define method persistentCache."); + throw new IncompatibleCbtVersionException("You need to override this method."); }; public default Map transientCache(){ - throw new IncompatibleCbtVersionException("You need to define method transientCache."); + throw new IncompatibleCbtVersionException("You need to override this method."); }; public default long start(){ - throw new IncompatibleCbtVersionException("You need to define method start."); + throw new IncompatibleCbtVersionException("You need to override this method."); }; public default File workingDirectory(){ return projectDirectory(); diff --git a/compatibility/Dependency.java b/compatibility/Dependency.java index d1d05b9..fda45cd 100644 --- a/compatibility/Dependency.java +++ b/compatibility/Dependency.java @@ -4,13 +4,13 @@ import java.io.*; public interface Dependency{ // recently added methods that needs default values for old versions to work public default String moduleKey(){ - throw new IncompatibleCbtVersionException("You need to define method moduleKey."); + throw new IncompatibleCbtVersionException("You need to override this method."); }; public default long lastModified(){ - throw new IncompatibleCbtVersionException("You need to define method lastModified."); + throw new IncompatibleCbtVersionException("You need to override this method."); }; public default ClassLoader classLoader(){ - throw new IncompatibleCbtVersionException("You need to define method classLoader."); + throw new IncompatibleCbtVersionException("You need to override this method."); }; // methods that exist for longer which every CBT version in use should have by now, no default values needed diff --git a/stage2/DirectoryDependency.scala b/stage2/DirectoryDependency.scala index f2b5557..9a50be4 100644 --- a/stage2/DirectoryDependency.scala +++ b/stage2/DirectoryDependency.scala @@ -121,7 +121,7 @@ object DirectoryDependency { build.asInstanceOf[Dependency] } catch { case e: ClassCastException => - throw new RuntimeException( "Your class " ++ lib.buildClassName ++ " needs to extend class BaseBuild in $buildFile", e ) + throw new RuntimeException( "Your class " ++ lib.buildClassName ++ s" needs to extend class BaseBuild in $buildFile", e ) } } )( context.logger, context.transientCache, context.classLoaderCache ) } -- cgit v1.2.3