Give a better error when the index argument for “frame select” can’t be parsed.

<rdar://problem/15390829>

llvm-svn: 194087
This commit is contained in:
Jim Ingham
2013-11-05 18:25:23 +00:00
parent 34a7109b47
commit afbb0af827

View File

@@ -245,7 +245,14 @@ protected:
if (command.GetArgumentCount() == 1)
{
const char *frame_idx_cstr = command.GetArgumentAtIndex(0);
frame_idx = Args::StringToUInt32 (frame_idx_cstr, UINT32_MAX, 0);
bool success = false;
frame_idx = Args::StringToUInt32 (frame_idx_cstr, UINT32_MAX, 0, &success);
if (!success)
{
result.AppendErrorWithFormat ("invalid frame index argument '%s'", frame_idx_cstr);
result.SetStatus (eReturnStatusFailed);
return false;
}
}
else if (command.GetArgumentCount() == 0)
{