@Override public DataAccessException convert(Exception source) { if (source instanceof RedisConnectionException) { return new RedisConnectionFailureException(source.getMessage(), source); } if (source instanceof RedisException) { return new InvalidDataAccessApiUsageException(source.getMessage(), source); } if (source instanceof DataAccessException) { return (DataAccessException) source; } if (source instanceof RedisTimeoutException) { return new QueryTimeoutException(source.getMessage(), source); } return null; }
assertEquals(transientConnEx2, tdarex2.getCause());
return new QueryTimeoutException(buildMessage(task, sql, ex), ex);
@Override public DataAccessException convert(Exception source) { if (source instanceof RedisConnectionException) { return new RedisConnectionFailureException(source.getMessage(), source); } if (source instanceof RedisRedirectException) { RedisRedirectException ex = (RedisRedirectException) source; return new ClusterRedirectException(ex.getSlot(), ex.getUrl().getHost(), ex.getUrl().getPort(), source); } if (source instanceof RedisException) { return new InvalidDataAccessApiUsageException(source.getMessage(), source); } if (source instanceof DataAccessException) { return (DataAccessException) source; } if (source instanceof RedisTimeoutException) { return new QueryTimeoutException(source.getMessage(), source); } return null; }
@Override public DataAccessException convert(Exception source) { if (source instanceof RedisConnectionException) { return new RedisConnectionFailureException(source.getMessage(), source); } if (source instanceof RedisRedirectException) { RedisRedirectException ex = (RedisRedirectException) source; return new ClusterRedirectException(ex.getSlot(), ex.getUrl().getHost(), ex.getUrl().getPort(), source); } if (source instanceof RedisException) { return new InvalidDataAccessApiUsageException(source.getMessage(), source); } if (source instanceof DataAccessException) { return (DataAccessException) source; } if (source instanceof RedisTimeoutException) { return new QueryTimeoutException(source.getMessage(), source); } return null; }
@Override public DataAccessException convert(Exception source) { if (source instanceof RedisConnectionException) { return new RedisConnectionFailureException(source.getMessage(), source); } if (source instanceof RedisRedirectException) { RedisRedirectException ex = (RedisRedirectException) source; return new ClusterRedirectException(ex.getSlot(), ex.getUrl().getHost(), ex.getUrl().getPort(), source); } if (source instanceof RedisException) { return new InvalidDataAccessApiUsageException(source.getMessage(), source); } if (source instanceof DataAccessException) { return (DataAccessException) source; } if (source instanceof RedisTimeoutException) { return new QueryTimeoutException(source.getMessage(), source); } return null; }
return new org.springframework.dao.QueryTimeoutException(ex.getMessage(), ex);
return new QueryTimeoutException("Redis command timed out", ex);
return new org.springframework.dao.QueryTimeoutException(ex.getMessage(), ex);
throw new RedisPipelineException(new QueryTimeoutException("Redis command timed out")); } catch (Exception e) { throw new RedisPipelineException(e);
return new QueryTimeoutException(buildMessage(task, sql, ex), ex);
return new org.springframework.dao.QueryTimeoutException(ex.getMessage() + "; SQL [" + jdbcEx.getSQL() + "]", ex);
return new org.springframework.dao.QueryTimeoutException(ex.getMessage() + "; SQL [" + jdbcEx.getSQL() + "]", ex);
return new org.springframework.dao.QueryTimeoutException(ex.getMessage() + "; SQL [" + jdbcEx.getSQL() + "]", ex);
return new org.springframework.dao.QueryTimeoutException(ex.getMessage() + "; SQL [" + jdbcEx.getSQL() + "]", ex);
public <T> Observable<T> executeAsync(Observable<T> asyncAction) { return asyncAction .onErrorResumeNext(new Func1<Throwable, Observable<T>>() { @Override public Observable<T> call(Throwable e) { if (e instanceof RuntimeException) { return Observable.error(exceptionTranslator.translateExceptionIfPossible((RuntimeException) e)); } else if (e instanceof TimeoutException) { return Observable.error(new QueryTimeoutException(e.getMessage(), e)); } else if (e instanceof InterruptedException) { return Observable.error(new OperationInterruptedException(e.getMessage(), e)); } else if (e instanceof ExecutionException) { return Observable.error(new OperationInterruptedException(e.getMessage(), e)); } else { return Observable.error(e); } } }); }
public <T> Observable<T> executeAsync(Observable<T> asyncAction) { return asyncAction .onErrorResumeNext(new Func1<Throwable, Observable<T>>() { @Override public Observable<T> call(Throwable e) { if (e instanceof RuntimeException) { return Observable.error(exceptionTranslator.translateExceptionIfPossible((RuntimeException) e)); } else if (e instanceof TimeoutException) { return Observable.error(new QueryTimeoutException(e.getMessage(), e)); } else if (e instanceof InterruptedException) { return Observable.error(new OperationInterruptedException(e.getMessage(), e)); } else if (e instanceof ExecutionException) { return Observable.error(new OperationInterruptedException(e.getMessage(), e)); } else { return Observable.error(e); } } }); }
public static Observable translateError(Throwable e) { if (e instanceof RuntimeException) { return Observable.error(exceptionTranslator.translateExceptionIfPossible((RuntimeException) e)); } else if(e instanceof TimeoutException) { return Observable.error(new QueryTimeoutException(e.getMessage(), e)); } else if(e instanceof InterruptedException) { return Observable.error(new OperationInterruptedException(e.getMessage(), e)); } else if(e instanceof ExecutionException) { return Observable.error(new OperationInterruptedException(e.getMessage(), e)); } else { return Observable.error(e); } } }
@Override public Observable<T> call(Throwable e) { if (e instanceof RuntimeException) { return Observable.error(exceptionTranslator.translateExceptionIfPossible((RuntimeException) e)); } else if (e instanceof TimeoutException) { return Observable.error(new QueryTimeoutException(e.getMessage(), e)); } else if (e instanceof InterruptedException) { return Observable.error(new OperationInterruptedException(e.getMessage(), e)); } else if (e instanceof ExecutionException) { return Observable.error(new OperationInterruptedException(e.getMessage(), e)); } else { return Observable.error(e); } } });
@Override public Observable<T> call(Throwable e) { if (e instanceof RuntimeException) { return Observable.error(exceptionTranslator.translateExceptionIfPossible((RuntimeException) e)); } else if (e instanceof TimeoutException) { return Observable.error(new QueryTimeoutException(e.getMessage(), e)); } else if (e instanceof InterruptedException) { return Observable.error(new OperationInterruptedException(e.getMessage(), e)); } else if (e instanceof ExecutionException) { return Observable.error(new OperationInterruptedException(e.getMessage(), e)); } else { return Observable.error(e); } } });