private MessageFault BuildFault(Exception error) { ServiceExceptionDetail exceptionDetail = new ServiceExceptionDetail(error); FaultCode code = FaultCode.CreateReceiverFaultCode(ServiceExceptionDetail.FaultSubCodeName, ServiceExceptionDetail.FaultSubCodeNamespace); return MessageFault.CreateFault(code, new FaultReason(error.Message), exceptionDetail); }
private MessageFault BuildFault(Exception error) { ServiceExceptionDetail exceptionDetail = new ServiceExceptionDetail(error); FaultCode code = FaultCode.CreateReceiverFaultCode(ServiceExceptionDetail.FaultSubCodeName, ServiceExceptionDetail.FaultSubCodeNamespace); return(MessageFault.CreateFault(code, new FaultReason(error.Message), exceptionDetail)); }
public ServiceExceptionDetail(Exception ex) : base(ex) { this.AssemblyQualifiedName = ex.GetType().AssemblyQualifiedName; if (null != ex.InnerException) { this.InnerException = new ServiceExceptionDetail(ex.InnerException); } }
public static Exception GetException(ServiceExceptionDetail exceptionDetail) { Type exceptionType = Type.GetType(exceptionDetail.AssemblyQualifiedName); if (null == exceptionDetail.InnerException) { return((Exception)Activator.CreateInstance(exceptionType, exceptionDetail.Message)); } Exception innerException = GetException(exceptionDetail.InnerException); return((Exception)Activator.CreateInstance(exceptionType, exceptionDetail.Message, innerException)); }