コード例 #1
0
        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);
        }
コード例 #2
0
ファイル: StockFault.cs プロジェクト: vinsom68/FlexTechnical
 /// <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;
 }