Exemplo n.º 1
0
        private void CatchException <T>(Exception ex, ESI4TServiceResponse <T> serviceResponse)
        {
            ESI4TServiceFault fault = new ESI4TServiceFault();

            ExceptionHelper.HandleException(ex, out fault);
            serviceResponse.ResponseContext.FaultCollection.Add(fault);
        }
Exemplo n.º 2
0
        public static void HandleException(Exception exception, out ESI4TServiceFault fault)
        {
            ESI4TIndexingException ampException = exception as ESI4TIndexingException;

            fault = new ESI4TServiceFault();
            if (ampException != null)
            {
                fault.Code    = ampException.Code;
                fault.Message = ampException.Message;
            }
            else
            {
                fault.Code    = ESI4T.Common.Services.ESI4TServiceConstants.ServiceFault.UNKNOWN_EXCEPTION_CODE;
                fault.Message = ESI4T.Common.Services.ESI4TServiceConstants.ServiceFault.UNKNOWN_EXCEPTION_MESSAGE;
            }
        }