List of usage examples for org.springframework.amqp UncategorizedAmqpException UncategorizedAmqpException
public UncategorizedAmqpException(Throwable cause)
From source file:org.springframework.amqp.rabbit.connection.RabbitUtils.java
public static RuntimeException convertRabbitAccessException(Throwable ex) { Assert.notNull(ex, "Exception must not be null"); if (ex instanceof AmqpException) { return (AmqpException) ex; }// www . jav a 2s . co m if (ex instanceof ShutdownSignalException) { return new AmqpConnectException((ShutdownSignalException) ex); } if (ex instanceof ConnectException) { return new AmqpConnectException((ConnectException) ex); } if (ex instanceof IOException) { return new AmqpIOException((IOException) ex); } if (ex instanceof UnsupportedEncodingException) { return new AmqpUnsupportedEncodingException(ex); } // fallback return new UncategorizedAmqpException(ex); }
From source file:org.springframework.amqp.rabbit.support.RabbitUtils.java
public static AmqpException convertRabbitAccessException(Throwable ex) { Assert.notNull(ex, "Exception must not be null"); if (ex instanceof AmqpException) { return (AmqpException) ex; }//from ww w. j a v a 2s . c o m if (ex instanceof ConnectException) { return new AmqpConnectException((ConnectException) ex); } if (ex instanceof IOException) { return new AmqpIOException((IOException) ex); } if (ex instanceof UnsupportedEncodingException) { return new AmqpUnsupportedEncodingException(ex); } // fallback return new UncategorizedAmqpException(ex); }