Skip to content

Commit dc3f4f9

Browse files
author
Enrico Granata
committed
Trigger the display of error and output in sourced commands from the result object's status instead of the presence of text in the error stream
This should be more consistent with the notion of command success/failure and avoids spewing warnings that the user might not care about There will need to be an option to specify the level of verbosity desired (never show anything, only show failures, errors and warning, everything) llvm-svn: 170167
1 parent 3b606d6 commit dc3f4f9

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

lldb/tools/driver/Driver.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1349,13 +1349,14 @@ Driver::MainLoop ()
13491349
}
13501350

13511351
// if the command sourcing generated an error - dump the result object
1352-
const size_t error_size = result.GetErrorSize();
1353-
if (error_size > 0)
1352+
if (result.Succeeded() == false)
13541353
{
13551354
const size_t output_size = result.GetOutputSize();
13561355
if (output_size > 0)
13571356
m_io_channel_ap->OutWrite (result.GetOutput(dump_stream_only_if_no_immediate), output_size, NO_ASYNC);
1358-
m_io_channel_ap->OutWrite (result.GetError(dump_stream_only_if_no_immediate), error_size, NO_ASYNC);
1357+
const size_t error_size = result.GetErrorSize();
1358+
if (error_size > 0)
1359+
m_io_channel_ap->OutWrite (result.GetError(dump_stream_only_if_no_immediate), error_size, NO_ASYNC);
13591360
}
13601361

13611362
result.Clear();

0 commit comments

Comments
 (0)