List of usage examples for javax.jms JMSException JMSException
public JMSException(String reason, String errorCode)
From source file:com.amazon.sqs.javamessaging.AmazonSQSMessagingClientWrapper.java
private JMSException handleException(AmazonClientException e, String operationName) throws JMSException { JMSException jmsException;/* w ww. j a va 2 s.c om*/ if (e instanceof AmazonServiceException) { AmazonServiceException se = (AmazonServiceException) e; if (e instanceof QueueDoesNotExistException) { jmsException = new InvalidDestinationException(logAndGetAmazonServiceException(se, operationName), se.getErrorCode()); } else if (isJMSSecurityException(se)) { jmsException = new JMSSecurityException(logAndGetAmazonServiceException(se, operationName), se.getErrorCode()); } else { jmsException = new JMSException(logAndGetAmazonServiceException(se, operationName), se.getErrorCode()); } } else { jmsException = new JMSException(logAndGetAmazonClientException(e, operationName)); } jmsException.initCause(e); return jmsException; }