List of usage examples for javax.jms JMSSecurityException JMSSecurityException
public JMSSecurityException(String reason, String errorCode)
From source file:com.amazon.sqs.javamessaging.AmazonSQSMessagingClientWrapper.java
private JMSException handleException(AmazonClientException e, String operationName) throws JMSException { JMSException jmsException;//from w ww . j ava 2s . c o m 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; }