List of usage examples for org.springframework.data.redis.listener.adapter RedisListenerExecutionFailedException RedisListenerExecutionFailedException
public RedisListenerExecutionFailedException(String msg, Throwable cause)
RedisListenerExecutionFailedException
instance. From source file:org.springframework.data.redis.listener.adapter.MessageListenerAdapter.java
/** * Invoke the specified listener method. * /*from w w w . j ava 2 s.c o m*/ * @param methodName the name of the listener method * @param arguments the message arguments to be passed in * @see #getListenerMethodName */ protected void invokeListenerMethod(String methodName, Object[] arguments) { try { invoker.invoke(arguments); } catch (InvocationTargetException ex) { Throwable targetEx = ex.getTargetException(); if (targetEx instanceof DataAccessException) { throw (DataAccessException) targetEx; } else { throw new RedisListenerExecutionFailedException( "Listener method '" + methodName + "' threw exception", targetEx); } } catch (Throwable ex) { throw new RedisListenerExecutionFailedException("Failed to invoke target method '" + methodName + "' with arguments " + ObjectUtils.nullSafeToString(arguments), ex); } }