[Lldb-commits] [lldb] r156686 -	/lldb/trunk/source/Commands/CommandObjectLog.cpp
    Jim Ingham 
    jingham at apple.com
       
    Fri May 11 17:38:30 PDT 2012
    
    
  
Author: jingham
Date: Fri May 11 19:38:30 2012
New Revision: 156686
URL: http://llvm.org/viewvc/llvm-project?rev=156686&view=rev
Log:
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.
Modified:
    lldb/trunk/source/Commands/CommandObjectLog.cpp
Modified: lldb/trunk/source/Commands/CommandObjectLog.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectLog.cpp?rev=156686&r1=156685&r2=156686&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectLog.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectLog.cpp Fri May 11 19:38:30 2012
@@ -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
         {
    
    
More information about the lldb-commits
mailing list