/// <summary> /// 功能:创建数据错误返回对象 /// </summary> /// <param name="instance">服务实例对象</param> /// <param name="dmex">错误</param> /// <returns>错误返回对象</returns> private FeedBackResponseBase GetDataErrorResponse(DataMessageException dmex) { FeedBackResponseBase fbrbReturn = new FeedBackResponseBase(); string strMegInfo = GlobalHelper.GetBdMessageValue(dmex.MsgCode, dmex.FormatArgs); fbrbReturn.SetMsgCode(dmex.MsgCode, strMegInfo); return(fbrbReturn); }
/// <summary> /// 功能:创建错误返回对象 /// </summary> /// <param name="instance">服务实例对象</param> /// <param name="ex">错语</param> /// <returns>错误返回对象</returns> private FeedBackResponseBase GetErrorResponse(object instance, Exception ex) { StringBuilder sbSource = new StringBuilder(); FeedBackResponseBase fbrbReturn = new FeedBackResponseBase(); if (null != instance) { sbSource.Append(instance.ToString()); } sbSource.Append("."); sbSource.Append(m_operationDescription.Name); fbrbReturn.SetServiceErrorMsg(ex); //日志 return(fbrbReturn); }