Cleaned up many error codes. For any who is filling in error strings into
lldb_private::Error objects the rules are:
- short strings that don't start with a capitol letter unless the name is a
class or anything else that is always capitolized
- no trailing newline character
- should be one line if possible
Implemented a first pass at adding "--gdb-format" support to anything that
accepts format with optional size/count.
git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@142999 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/source/Commands/CommandObjectCommands.cpp b/source/Commands/CommandObjectCommands.cpp
index ba81f28..cb43f65 100644
--- a/source/Commands/CommandObjectCommands.cpp
+++ b/source/Commands/CommandObjectCommands.cpp
@@ -62,7 +62,7 @@
case 'c':
m_end_idx = Args::StringToUInt32(option_arg, UINT_MAX, 0, &success);
if (!success)
- error.SetErrorStringWithFormat("Invalid value for count: %s.\n", option_arg);
+ error.SetErrorStringWithFormat("invalid value for count: %s", option_arg);
if (m_end_idx != 0)
m_end_idx--;
m_start_idx = 0;
@@ -70,15 +70,15 @@
case 'e':
m_end_idx = Args::StringToUInt32(option_arg, 0, 0, &success);
if (!success)
- error.SetErrorStringWithFormat("Invalid value for end index: %s.\n", option_arg);
+ error.SetErrorStringWithFormat("invalid value for end index: %s", option_arg);
break;
case 's':
m_start_idx = Args::StringToUInt32(option_arg, 0, 0, &success);
if (!success)
- error.SetErrorStringWithFormat("Invalid value for start index: %s.\n", option_arg);
+ error.SetErrorStringWithFormat("invalid value for start index: %s", option_arg);
break;
default:
- error.SetErrorStringWithFormat ("Unrecognized option '%c'.\n", short_option);
+ error.SetErrorStringWithFormat ("unrecognized option '%c'", short_option);
break;
}
@@ -188,15 +188,15 @@
case 'e':
m_stop_on_error = Args::StringToBoolean(option_arg, true, &success);
if (!success)
- error.SetErrorStringWithFormat("Invalid value for stop-on-error: %s.\n", option_arg);
+ error.SetErrorStringWithFormat("invalid value for stop-on-error: %s", option_arg);
break;
case 'c':
m_stop_on_continue = Args::StringToBoolean(option_arg, true, &success);
if (!success)
- error.SetErrorStringWithFormat("Invalid value for stop-on-continue: %s.\n", option_arg);
+ error.SetErrorStringWithFormat("invalid value for stop-on-continue: %s", option_arg);
break;
default:
- error.SetErrorStringWithFormat ("Unrecognized option '%c'.\n", short_option);
+ error.SetErrorStringWithFormat ("unrecognized option '%c'", short_option);
break;
}
@@ -478,7 +478,7 @@
if (!cmd_obj)
{
- result.AppendErrorWithFormat ("Invalid command given to 'alias'. '%s' does not begin with a valid command."
+ result.AppendErrorWithFormat ("invalid command given to 'alias'. '%s' does not begin with a valid command."
" No alias created.", raw_command_string.c_str());
result.SetStatus (eReturnStatusFailed);
return false;
@@ -1008,7 +1008,7 @@
break;
default:
- error.SetErrorStringWithFormat ("Unrecognized option '%c'.\n", short_option);
+ error.SetErrorStringWithFormat ("unrecognized option '%c'", short_option);
break;
}
@@ -1325,7 +1325,7 @@
m_funct_name = std::string(option_arg);
break;
default:
- error.SetErrorStringWithFormat ("Unrecognized option '%c'.\n", short_option);
+ error.SetErrorStringWithFormat ("unrecognized option '%c'", short_option);
break;
}