mirror of
https://github.com/intel/llvm.git
synced 2026-01-20 10:58:11 +08:00
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... llvm-svn: 165349
This commit is contained in:
@@ -82,9 +82,12 @@ CommandObjectRegexCommand::DoExecute
|
||||
}
|
||||
}
|
||||
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");
|
||||
|
||||
Reference in New Issue
Block a user