Example usage for org.springframework.amqp AmqpIOException getCause

List of usage examples for org.springframework.amqp AmqpIOException getCause

Introduction

In this page you can find the example usage for org.springframework.amqp AmqpIOException getCause.

Prototype

public synchronized Throwable getCause() 

Source Link

Document

Returns the cause of this throwable or null if the cause is nonexistent or unknown.

Usage

From source file:org.springframework.amqp.rabbit.listener.DirectMessageListenerContainer.java

@Override
public void addQueueNames(String... queueNames) {
    try {/*from  w ww  .j a  v  a  2 s.  c o  m*/
        addQueues(Arrays.stream(queueNames));
    } catch (AmqpIOException e) {
        throw new AmqpIOException("Failed to add " + Arrays.asList(queueNames), e.getCause());
    }
    super.addQueueNames(queueNames);
}

From source file:org.springframework.amqp.rabbit.listener.DirectMessageListenerContainer.java

@Override
public void addQueues(Queue... queues) {
    try {/*from www  . ja  v a 2  s  .  c om*/
        addQueues(Arrays.stream(queues).map(Queue::getName));
    } catch (AmqpIOException e) {
        throw new AmqpIOException("Failed to add " + Arrays.asList(queues), e.getCause());
    }
    super.addQueues(queues);
}