aboutsummaryrefslogtreecommitdiff
path: root/lldb/source/Commands/CommandObjectSource.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source/Commands/CommandObjectSource.cpp')
-rw-r--r--lldb/source/Commands/CommandObjectSource.cpp25
1 files changed, 12 insertions, 13 deletions
diff --git a/lldb/source/Commands/CommandObjectSource.cpp b/lldb/source/Commands/CommandObjectSource.cpp
index 98907c4..5ddd46a 100644
--- a/lldb/source/Commands/CommandObjectSource.cpp
+++ b/lldb/source/Commands/CommandObjectSource.cpp
@@ -50,20 +50,20 @@ class CommandObjectSourceInfo : public CommandObjectParsed {
switch (short_option) {
case 'l':
if (option_arg.getAsInteger(0, start_line))
- error.SetErrorStringWithFormat("invalid line number: '%s'",
- option_arg.str().c_str());
+ error = Status::FromErrorStringWithFormat("invalid line number: '%s'",
+ option_arg.str().c_str());
break;
case 'e':
if (option_arg.getAsInteger(0, end_line))
- error.SetErrorStringWithFormat("invalid line number: '%s'",
- option_arg.str().c_str());
+ error = Status::FromErrorStringWithFormat("invalid line number: '%s'",
+ option_arg.str().c_str());
break;
case 'c':
if (option_arg.getAsInteger(0, num_lines))
- error.SetErrorStringWithFormat("invalid line count: '%s'",
- option_arg.str().c_str());
+ error = Status::FromErrorStringWithFormat("invalid line count: '%s'",
+ option_arg.str().c_str());
break;
case 'f':
@@ -612,14 +612,14 @@ class CommandObjectSourceList : public CommandObjectParsed {
switch (short_option) {
case 'l':
if (option_arg.getAsInteger(0, start_line))
- error.SetErrorStringWithFormat("invalid line number: '%s'",
- option_arg.str().c_str());
+ error = Status::FromErrorStringWithFormat("invalid line number: '%s'",
+ option_arg.str().c_str());
break;
case 'c':
if (option_arg.getAsInteger(0, num_lines))
- error.SetErrorStringWithFormat("invalid line count: '%s'",
- option_arg.str().c_str());
+ error = Status::FromErrorStringWithFormat("invalid line count: '%s'",
+ option_arg.str().c_str());
break;
case 'f':
@@ -649,9 +649,8 @@ class CommandObjectSourceList : public CommandObjectParsed {
OptionValueFileColonLine value;
Status fcl_err = value.SetValueFromString(option_arg);
if (!fcl_err.Success()) {
- error.SetErrorStringWithFormat(
- "Invalid value for file:line specifier: %s",
- fcl_err.AsCString());
+ error = Status::FromErrorStringWithFormat(
+ "Invalid value for file:line specifier: %s", fcl_err.AsCString());
} else {
file_name = value.GetFileSpec().GetPath();
start_line = value.GetLineNumber();