public static void Handle(FaultException faultException) { Exception innerException = null; if (faultException is FaultException<StockFault>) { var fault = faultException as FaultException<StockFault>; innerException = new StockException(fault.Message); } if (innerException == null) { throw faultException; } throw new StockException("A exception has occured.",innerException); }
/// <summary> /// Initializes a new instance of the <see cref="RecordNotFoundFault"/> class. /// </summary> /// <param name="exception">The exception.</param> public StockFault(StockException exception) { Method = exception.Method; ErrorCode = exception.ErrorCode; }