private void handleException()

in evcache-core/src/main/java/com/netflix/evcache/EVCacheImpl.java [722:752]


    private void handleException(Throwable ex, EVCacheEvent event) {
        if (ex.getCause() instanceof  RuntimeException) {
            if (log.isDebugEnabled() && shouldLog()) {
                log.debug("Handling exception with cause ", ex.getCause());
            }
            Throwable runTimeCause = ex.getCause();
            if (runTimeCause.getCause() instanceof ExecutionException) {
                if (log.isDebugEnabled() && shouldLog()) {
                    log.debug("Handling ExecutionException with cause ",runTimeCause.getCause());
                }
                Throwable executionExceptionCause = runTimeCause.getCause();
                if (executionExceptionCause.getCause() instanceof net.spy.memcached.internal.CheckedOperationTimeoutException) {
                    if (event != null) {
                        if (log.isDebugEnabled() && shouldLog()) {
                            log.debug("Setting Status as Timeout");
                        }
                        event.setStatus(EVCacheMetricsFactory.TIMEOUT);
                        eventError(event, ex);
                    }
                }
                return;
            }
        }
        if (event != null) {
            if (log.isDebugEnabled() && shouldLog()) {
                log.debug("Setting event as Error");
            }
            event.setStatus(EVCacheMetricsFactory.ERROR);
            eventError(event, ex);
        }
    }