Ensure that errors in frame variable are reflected in result object.
The statistics for frame variable show invocations as being successful, even
when executing one of the error paths.
This change replaces result.GetErrorStream() with result.AppendError(),
which also sets the status to eReturnStatusFailed.
this regex error is a weird edge case. For example, considering running:
if the doesntMatchAnyVars pattern has no matches, then the command prints an error, and the result would be marked as an error. But if the matchesSomeVars does have matches, then we have a partial success / partial failure. In such a case, should the result be marked success, or failure? I don't know, but I would lean to success since it does entirely fail. Maybe a user could expect some patterns to match and some to not match. For example: a user alias that prints any variables based on a set of patterns they're interested in.