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.
clang-format not found in user’s local PATH; not linting file.