mirror of
https://github.com/intel/llvm.git
synced 2026-01-16 05:32:28 +08:00
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:
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user