[Lldb-commits] [lldb] r165349 - /lldb/trunk/source/Interpreter/CommandObjectRegexCommand.cpp
Jim Ingham
jingham at apple.com
Fri Oct 5 17:27:04 PDT 2012
Author: jingham
Date: Fri Oct 5 19:27:04 2012
New Revision: 165349
URL: http://llvm.org/viewvc/llvm-project?rev=165349&view=rev
Log:
Make the error message from regex commands use the command's syntax string if it exists rather than a generic but
not at all helpful message about not matching some unknown regex...
Modified:
lldb/trunk/source/Interpreter/CommandObjectRegexCommand.cpp
Modified: lldb/trunk/source/Interpreter/CommandObjectRegexCommand.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Interpreter/CommandObjectRegexCommand.cpp?rev=165349&r1=165348&r2=165349&view=diff
==============================================================================
--- lldb/trunk/source/Interpreter/CommandObjectRegexCommand.cpp (original)
+++ lldb/trunk/source/Interpreter/CommandObjectRegexCommand.cpp Fri Oct 5 19:27:04 2012
@@ -82,9 +82,12 @@
}
}
result.SetStatus(eReturnStatusFailed);
- result.AppendErrorWithFormat ("Command contents '%s' failed to match any regular expression in the '%s' regex command.\n",
- command,
- m_cmd_name.c_str());
+ if (GetSyntax() != NULL)
+ result.AppendError (GetSyntax());
+ else
+ result.AppendErrorWithFormat ("Command contents '%s' failed to match any regular expression in the '%s' regex command.\n",
+ command,
+ m_cmd_name.c_str());
return false;
}
result.AppendError("empty command passed to regular expression command");
More information about the lldb-commits
mailing list