public void Assign(string exp, string value, bool throwsifnotexists, int update) { if (string.IsNullOrEmpty(exp)) { return; } try { var envTemp = PublicFunctions.EvalAssignWithFrame(new AssignValue(exp, value), update, _env); _env = envTemp; CommitAssign(); } catch (Exception err) { var msg = err.Message; var msgWithVariableName = msg + ": " + "{ " + DataListUtilBase.StripLeadingAndTrailingBracketsFromValue(exp) + " }"; if (err is NullValueInVariableException variableException && err.Message.Contains("Scalar value ")) { throw new WarewolfExecutionEnvironmentException(err.Message); } if (throwsifnotexists) { throw new WarewolfExecutionEnvironmentException(msgWithVariableName); } Errors.Add(msgWithVariableName); } }
public void AssignWithFrame(IAssignValue values, int update) { try { var envTemp = PublicFunctions.EvalAssignWithFrame(values, update, _env); _env = envTemp; } catch (Exception err) { throw new WarewolfExecutionEnvironmentException(err.Message + ": " + "{ " + DataListUtilBase.StripLeadingAndTrailingBracketsFromValue(values.Name) + " }"); } }
public void Assign(string exp, string value, int update) { if (string.IsNullOrEmpty(exp)) { return; } var envTemp = PublicFunctions.EvalAssignWithFrame(new AssignValue(exp, value), update, _env); _env = envTemp; CommitAssign(); }
public void AssignWithFrame(IAssignValue values, int update) { try { var envTemp = PublicFunctions.EvalAssignWithFrame(values, update, _env); _env = envTemp; } catch (Exception err) { Errors.Add(err.Message); throw; } }
public void AssignWithFrame(IAssignValue values, int update) { try { if (string.IsNullOrEmpty(values.Name)) { return; } var envTemp = PublicFunctions.EvalAssignWithFrame(values, update, _env); _env = envTemp; } catch (Exception err) { Errors.Add(err.Message); throw; } }
public void Assign(string exp, string value, int update) { if (string.IsNullOrEmpty(exp)) { return; } try { var envTemp = PublicFunctions.EvalAssignWithFrame(new AssignValue(exp, value), update, _env); _env = envTemp; CommitAssign(); } catch (Exception err) { Errors.Add(err.Message); } }