public void AssignString(string exp, string value, bool throwsifnotexists, int update) { if (string.IsNullOrEmpty(exp)) { return; } try { var envTemp = PublicFunctions.EvalAssignWithFrameTypeCast(new AssignValue(exp, value), update, _env, ShouldTypeCast.No); _env = envTemp; CommitAssign(); } catch (Exception err) { var msg = err.Message; if (throwsifnotexists) { throw new WarewolfExecutionEnvironmentException(msg + ": " + "{ " + DataListUtilBase.StripLeadingAndTrailingBracketsFromValue(exp) + " }"); } Errors.Add(msg + ": " + "{ " + DataListUtilBase.StripLeadingAndTrailingBracketsFromValue(exp) + " }"); } }
public void AssignString(string exp, string value, int update) { if (string.IsNullOrEmpty(exp)) { return; } try { var envTemp = PublicFunctions.EvalAssignWithFrameTypeCast(new AssignValue(exp, value), update, _env, ShouldTypeCast.No); _env = envTemp; CommitAssign(); } catch (Exception err) { Errors.Add(err.Message); } }