refactoring

pull/970/merge
Nikita Koksharov 5 years ago
parent 66f1a2cd81
commit b5dc17a390

@ -38,6 +38,10 @@ public class RedissonExceptionConverter implements Converter<Exception, DataAcce
return new RedisConnectionFailureException(source.getMessage(), source); return new RedisConnectionFailureException(source.getMessage(), source);
} }
if (source instanceof RedisTimeoutException) {
return new QueryTimeoutException(source.getMessage(), source);
}
if (source instanceof RedisException) { if (source instanceof RedisException) {
return new InvalidDataAccessApiUsageException(source.getMessage(), source); return new InvalidDataAccessApiUsageException(source.getMessage(), source);
} }
@ -46,10 +50,6 @@ public class RedissonExceptionConverter implements Converter<Exception, DataAcce
return (DataAccessException) source; return (DataAccessException) source;
} }
if (source instanceof RedisTimeoutException) {
return new QueryTimeoutException(source.getMessage(), source);
}
return null; return null;
} }

@ -44,6 +44,10 @@ public class RedissonExceptionConverter implements Converter<Exception, DataAcce
return new ClusterRedirectException(ex.getSlot(), ex.getUrl().getHost(), ex.getUrl().getPort(), source); return new ClusterRedirectException(ex.getSlot(), ex.getUrl().getHost(), ex.getUrl().getPort(), source);
} }
if (source instanceof RedisTimeoutException) {
return new QueryTimeoutException(source.getMessage(), source);
}
if (source instanceof RedisException) { if (source instanceof RedisException) {
return new InvalidDataAccessApiUsageException(source.getMessage(), source); return new InvalidDataAccessApiUsageException(source.getMessage(), source);
} }
@ -52,10 +56,6 @@ public class RedissonExceptionConverter implements Converter<Exception, DataAcce
return (DataAccessException) source; return (DataAccessException) source;
} }
if (source instanceof RedisTimeoutException) {
return new QueryTimeoutException(source.getMessage(), source);
}
return null; return null;
} }

@ -44,6 +44,10 @@ public class RedissonExceptionConverter implements Converter<Exception, DataAcce
return new ClusterRedirectException(ex.getSlot(), ex.getUrl().getHost(), ex.getUrl().getPort(), source); return new ClusterRedirectException(ex.getSlot(), ex.getUrl().getHost(), ex.getUrl().getPort(), source);
} }
if (source instanceof RedisTimeoutException) {
return new QueryTimeoutException(source.getMessage(), source);
}
if (source instanceof RedisException) { if (source instanceof RedisException) {
return new InvalidDataAccessApiUsageException(source.getMessage(), source); return new InvalidDataAccessApiUsageException(source.getMessage(), source);
} }
@ -52,10 +56,6 @@ public class RedissonExceptionConverter implements Converter<Exception, DataAcce
return (DataAccessException) source; return (DataAccessException) source;
} }
if (source instanceof RedisTimeoutException) {
return new QueryTimeoutException(source.getMessage(), source);
}
return null; return null;
} }

@ -44,6 +44,10 @@ public class RedissonExceptionConverter implements Converter<Exception, DataAcce
return new ClusterRedirectException(ex.getSlot(), ex.getUrl().getHost(), ex.getUrl().getPort(), source); return new ClusterRedirectException(ex.getSlot(), ex.getUrl().getHost(), ex.getUrl().getPort(), source);
} }
if (source instanceof RedisTimeoutException) {
return new QueryTimeoutException(source.getMessage(), source);
}
if (source instanceof RedisException) { if (source instanceof RedisException) {
return new InvalidDataAccessApiUsageException(source.getMessage(), source); return new InvalidDataAccessApiUsageException(source.getMessage(), source);
} }
@ -52,10 +56,6 @@ public class RedissonExceptionConverter implements Converter<Exception, DataAcce
return (DataAccessException) source; return (DataAccessException) source;
} }
if (source instanceof RedisTimeoutException) {
return new QueryTimeoutException(source.getMessage(), source);
}
return null; return null;
} }

@ -44,6 +44,10 @@ public class RedissonExceptionConverter implements Converter<Exception, DataAcce
return new ClusterRedirectException(ex.getSlot(), ex.getUrl().getHost(), ex.getUrl().getPort(), source); return new ClusterRedirectException(ex.getSlot(), ex.getUrl().getHost(), ex.getUrl().getPort(), source);
} }
if (source instanceof RedisTimeoutException) {
return new QueryTimeoutException(source.getMessage(), source);
}
if (source instanceof RedisException) { if (source instanceof RedisException) {
return new InvalidDataAccessApiUsageException(source.getMessage(), source); return new InvalidDataAccessApiUsageException(source.getMessage(), source);
} }
@ -52,10 +56,6 @@ public class RedissonExceptionConverter implements Converter<Exception, DataAcce
return (DataAccessException) source; return (DataAccessException) source;
} }
if (source instanceof RedisTimeoutException) {
return new QueryTimeoutException(source.getMessage(), source);
}
return null; return null;
} }

@ -44,6 +44,10 @@ public class RedissonExceptionConverter implements Converter<Exception, DataAcce
return new ClusterRedirectException(ex.getSlot(), ex.getUrl().getHost(), ex.getUrl().getPort(), source); return new ClusterRedirectException(ex.getSlot(), ex.getUrl().getHost(), ex.getUrl().getPort(), source);
} }
if (source instanceof RedisTimeoutException) {
return new QueryTimeoutException(source.getMessage(), source);
}
if (source instanceof RedisException) { if (source instanceof RedisException) {
return new InvalidDataAccessApiUsageException(source.getMessage(), source); return new InvalidDataAccessApiUsageException(source.getMessage(), source);
} }
@ -52,10 +56,6 @@ public class RedissonExceptionConverter implements Converter<Exception, DataAcce
return (DataAccessException) source; return (DataAccessException) source;
} }
if (source instanceof RedisTimeoutException) {
return new QueryTimeoutException(source.getMessage(), source);
}
return null; return null;
} }

@ -44,6 +44,10 @@ public class RedissonExceptionConverter implements Converter<Exception, DataAcce
return new ClusterRedirectException(ex.getSlot(), ex.getUrl().getHost(), ex.getUrl().getPort(), source); return new ClusterRedirectException(ex.getSlot(), ex.getUrl().getHost(), ex.getUrl().getPort(), source);
} }
if (source instanceof RedisTimeoutException) {
return new QueryTimeoutException(source.getMessage(), source);
}
if (source instanceof RedisException) { if (source instanceof RedisException) {
return new InvalidDataAccessApiUsageException(source.getMessage(), source); return new InvalidDataAccessApiUsageException(source.getMessage(), source);
} }
@ -52,10 +56,6 @@ public class RedissonExceptionConverter implements Converter<Exception, DataAcce
return (DataAccessException) source; return (DataAccessException) source;
} }
if (source instanceof RedisTimeoutException) {
return new QueryTimeoutException(source.getMessage(), source);
}
return null; return null;
} }

Loading…
Cancel
Save