static void AppendDetails(StringBuilder sb, ExceptionDetail ed)
 {
     sb.AppendLine(ed.ExceptionTypeName);
     sb.AppendLine(ed.Message);
     sb.AppendLine(ed.StackTrace);
     sb.AppendLine(string.Format("HelpLink: {0}", ed.HelpLink));
     sb.AppendLine();
 }
示例#2
0
        public ServiceFault(string serviceName, Exception ex)
            : base(serviceName)
        {
            InnerExceptions = new List<ExceptionDetail>();

            EventType = ServiceEventType.Fault;

            if (ex != null)
            {
                ExceptionDetail = new ExceptionDetail
                    {
                        Message = ex.Message,
                        StackTrace = ex.StackTrace
                    };

                RecordInnerException(ex.InnerException);
            }
        }