Dear All,
according to Stata's manual: "capture executes command, suppressing all its output (including error messages, if any)..."
But I can't get it why the -capture- command doesn't work in Stata 17.0. By "doesn't work" here I mean "doesn't suppress the error message in the output".
Here is what I type:
I don't seem to find a way to prevent the error message from appearing.
My expectation is to have a blank result in foo after running these lines (note I specifically clear the local foo before running this line).
How can the error message be really suppressed?
Stata version is 17.0(170130) on Windows, if that matters.
Thank you, Sergiy
according to Stata's manual: "capture executes command, suppressing all its output (including error messages, if any)..."
But I can't get it why the -capture- command doesn't work in Stata 17.0. By "doesn't work" here I mean "doesn't suppress the error message in the output".
Here is what I type:
Code:
.
local foo
capture local foo `"`: dir "./bar" dirs "*"'"'
directory ./bar not found
My expectation is to have a blank result in foo after running these lines (note I specifically clear the local foo before running this line).
How can the error message be really suppressed?
Stata version is 17.0(170130) on Windows, if that matters.
Thank you, Sergiy
Comment