/// <summary> /// Add an execution error, with an error parameter. /// </summary> /// <param name="errCode"></param> /// <param name="paramKey"></param> /// <param name="paramValue"></param> /// <returns></returns> public ExprError AddErrorExec(ErrorCode errCode, string paramKey, string paramValue) { ExprError error = new ExprError(); error.ErrorType = ErrorType.Exec; error.Code = errCode; if (string.IsNullOrEmpty(paramKey)) { paramKey = "Param1"; } if (string.IsNullOrEmpty(paramValue)) { paramKey = "(null)"; } ErrorParam errorParam = new ErrorParam(); errorParam.Key = paramKey; errorParam.Value = paramValue; error.ListErrorParam.Add(errorParam); ListError.Add(error); return(error); }
public void AddParam(string key, string value) { ErrorParam errorParam = new ErrorParam(); errorParam.Key = key; errorParam.Value = value; ListErrorParam.Add(errorParam); }
public static ExprError CreateError(ErrorCode errCode, string paramKey, string paramValue) { ExprError error = new ExprError(); error.Code = errCode; if (string.IsNullOrEmpty(paramKey)) paramKey = "Param1"; if (string.IsNullOrEmpty(paramValue)) paramKey = "(null)"; ErrorParam errorParam = new ErrorParam(); errorParam.Key = paramKey; errorParam.Value = paramValue; //error.Param = param; error.ListErrorParam.Add(errorParam); return error; }
public ExprError AddErrorExec(ErrorCode errCode, string paramKey, string paramValue, string paramKey2, string paramValue2) { ExprError error = AddErrorExec(errCode, paramKey, paramValue); if (string.IsNullOrEmpty(paramKey2)) { paramKey = "Param2"; } if (string.IsNullOrEmpty(paramValue2)) { paramKey = "(null)"; } ErrorParam errorParam = new ErrorParam(); errorParam.Key = paramKey2; errorParam.Value = paramValue2; error.ListErrorParam.Add(errorParam); return(error); }