|
34 | 34 |
|
35 | 35 | import org.springframework.aop.framework.ProxyFactory;
|
36 | 36 | import org.springframework.core.convert.converter.Converter;
|
| 37 | +import org.springframework.dao.InvalidDataAccessApiUsageException; |
37 | 38 | import org.springframework.data.redis.connection.convert.Converters;
|
38 | 39 | import org.springframework.lang.Nullable;
|
39 | 40 | import org.springframework.util.Assert;
|
@@ -82,7 +83,7 @@ <R> R just(ConnectionFunction0<R> function) {
|
82 | 83 | Assert.notNull(function, "ConnectionFunction must not be null!");
|
83 | 84 |
|
84 | 85 | return synchronizer.invoke(function::apply, it -> {
|
85 |
| - throw new UnsupportedOperationException("Operation not supported by Jedis in pipelining/transaction mode"); |
| 86 | + throw new InvalidDataAccessApiUsageException("Operation not supported by Jedis in pipelining/transaction mode"); |
86 | 87 | }, Converters.identityConverter(), () -> null);
|
87 | 88 | }
|
88 | 89 |
|
@@ -231,7 +232,7 @@ <R> SingleInvocationSpec<R> from(ConnectionFunction0<R> function) {
|
231 | 232 | Assert.notNull(function, "ConnectionFunction must not be null!");
|
232 | 233 |
|
233 | 234 | return from(function, connection -> {
|
234 |
| - throw new UnsupportedOperationException("Operation not supported in pipelining/transaction mode"); |
| 235 | + throw new InvalidDataAccessApiUsageException("Operation not supported in pipelining/transaction mode"); |
235 | 236 | });
|
236 | 237 | }
|
237 | 238 |
|
@@ -379,7 +380,7 @@ <R extends Collection<E>, E> ManyInvocationSpec<E> fromMany(ConnectionFunction0<
|
379 | 380 | Assert.notNull(function, "ConnectionFunction must not be null!");
|
380 | 381 |
|
381 | 382 | return fromMany(function, connection -> {
|
382 |
| - throw new UnsupportedOperationException("Operation not supported in pipelining/transaction mode"); |
| 383 | + throw new InvalidDataAccessApiUsageException("Operation not supported in pipelining/transaction mode"); |
383 | 384 | });
|
384 | 385 | }
|
385 | 386 |
|
|
0 commit comments