Add a useful error message to "log enable" with the wrong number of arguments, and reject "log enable lldb" which just silently did nothing before.
git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@156686 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/source/Commands/CommandObjectLog.cpp b/source/Commands/CommandObjectLog.cpp
index 611c76b..3e85ff9 100644
--- a/source/Commands/CommandObjectLog.cpp
+++ b/source/Commands/CommandObjectLog.cpp
@@ -114,9 +114,9 @@
Execute (Args& args,
CommandReturnObject &result)
{
- if (args.GetArgumentCount() < 1)
+ if (args.GetArgumentCount() < 2)
{
- result.AppendErrorWithFormat("Usage: %s\n", m_cmd_syntax.c_str());
+ result.AppendErrorWithFormat("%s takes a log channel and one or more log types.\n", m_cmd_name.c_str());
}
else
{
@@ -264,7 +264,7 @@
const size_t argc = args.GetArgumentCount();
if (argc == 0)
{
- result.AppendErrorWithFormat("Usage: %s\n", m_cmd_syntax.c_str());
+ result.AppendErrorWithFormat("%s takes a log channel and one or more log types.\n", m_cmd_name.c_str());
}
else
{