Beispiel #1
0
        public static void HandleException(Exception exception)
        {
            ESI4TIndexingException ampException = exception as ESI4TIndexingException;

            if (ampException != null)
            {
                LogException(ampException);
            }
        }
Beispiel #2
0
        public static void HandleCustomException(Exception ex, string LogMessage)
        {
            ESI4TIndexingException ampEx = ex as ESI4TIndexingException;

            if (ampEx != null)
            {
                ESI4TLogger.WriteLog(ELogLevel.WARN, LogMessage);
            }
            else
            {
                ESI4TLogger.WriteLog(ELogLevel.ERROR, LogMessage);
            }
        }
Beispiel #3
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;
            }
        }
Beispiel #4
0
 private static void LogException(ESI4TIndexingException ampException)
 {
     ESI4TLogger.WriteLog(ELogLevel.ERROR, ampException.Message + ", Code " + ampException.Code);
 }