Include 'nosbt' in 'trace' error message

This commit is contained in:
Mark Harrah 2010-01-16 14:29:00 -05:00
parent e110d4028b
commit 327fd718f2
1 changed files with 3 additions and 2 deletions

View File

@ -413,7 +413,7 @@ class xMain extends xsbti.AppMain
printCmd(HelpAction, "Displays this help message.")
printCmd(ShowCurrent, "Shows the current project, Scala version, and logging level.")
printCmd(Level.levels.mkString(", "), "Set logging for the current project to the specified level.")
printCmd(TraceCommand, "Toggles whether logging stack traces is enabled.")
printCmd(TraceCommand + " " + validTraceArguments, "Configures stack trace logging.")
printCmd(ProjectAction + " <project name>", "Sets the currently active project.")
printCmd(ShowProjectsAction, "Shows all available projects.")
printCmd(TerminateActions.elements.mkString(", "), "Terminates the build.")
@ -696,8 +696,9 @@ class xMain extends xsbti.AppMain
actionValid
}
def validTraceArguments = "'on', 'nosbt', 'off', or <integer>.\n 'nosbt' prints stack traces up to the first sbt frame.\n An integer argument defines the number of stack elements to show per exception."
private def isTerminateAction(s: String) = TerminateActions.elements.contains(s.toLowerCase)
private def setTraceError(log: Logger) = logError(log)("Invalid arguments for 'trace': expected 'on', 'off', or integer number of stack elements to show per exception.")
private def setTraceError(log: Logger) = logError(log)("Invalid arguments for 'trace': expected " + validTraceArguments + ".")
private def setArgumentError(log: Logger) = logError(log)("Invalid arguments for 'set': expected property name and new value.")
private def getArgumentError(log: Logger) = logError(log)("Invalid arguments for 'get': expected property name.")
private def setProjectError(log: Logger) = logError(log)("Invalid arguments for 'project': expected project name.")