Esempio n. 1
0
        private MessageFault BuildFault(Exception error)
        {
            var exceptionDetail = new FaultMessage(error);
            var code            = FaultCode.CreateReceiverFaultCode(FaultMessage.FaultSubCodeName,
                                                                    FaultMessage.FaultSubCodeNamespace);

            return(MessageFault.CreateFault(code, new FaultReason(error.Message), exceptionDetail));
        }
Esempio n. 2
0
 public FaultMessage(Exception ex)
     : base(ex)
 {
     AssemblyQualifiedName = ex.GetType().AssemblyQualifiedName;
     if (null != ex.InnerException)
     {
         InnerException = new FaultMessage(ex.InnerException);
     }
 }
Esempio n. 3
0
        private Exception GetException(FaultMessage exceptionDetail)
        {
            if (null == exceptionDetail.InnerException)
            {
                return((Exception)Activator.CreateInstance(
                           Type.GetType(exceptionDetail.AssemblyQualifiedName),
                           exceptionDetail.Message));
            }

            var innerException = GetException(exceptionDetail.InnerException);

            return((Exception)Activator.CreateInstance(
                       Type.GetType(exceptionDetail.AssemblyQualifiedName),
                       exceptionDetail.Message, innerException));
        }