qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From arnaudsi...@apache.org
Subject svn commit: r587809 - /incubator/qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/client/BasicMessageProducer_0_10.java
Date Wed, 24 Oct 2007 08:05:02 GMT
Author: arnaudsimon
Date: Wed Oct 24 01:05:02 2007
New Revision: 587809

URL: http://svn.apache.org/viewvc?rev=587809&view=rev
Log:
Added exception handling

Modified:
    incubator/qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/client/BasicMessageProducer_0_10.java

Modified: incubator/qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/client/BasicMessageProducer_0_10.java
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/client/BasicMessageProducer_0_10.java?rev=587809&r1=587808&r2=587809&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/client/BasicMessageProducer_0_10.java
(original)
+++ incubator/qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/client/BasicMessageProducer_0_10.java
Wed Oct 24 01:05:02 2007
@@ -100,7 +100,7 @@
                 qpidityMessage.getDeliveryProperties().setExpiration(0);
             }
         }
-        qpidityMessage.getDeliveryProperties().setDeliveryMode((byte) deliveryMode);
+            qpidityMessage.getDeliveryProperties().setDeliveryMode((byte) deliveryMode);
         qpidityMessage.getDeliveryProperties().setPriority((byte) priority);
         qpidityMessage.getDeliveryProperties().setExchange(destination.getExchangeName().toString());
         qpidityMessage.getDeliveryProperties().setRoutingKey(destination.getRoutingKey().toString());
@@ -163,6 +163,12 @@
         catch (IOException e)
         {
             throw ExceptionHelper.convertQpidExceptionToJMSException(e);
+        }
+        catch(RuntimeException rte)
+        {
+            JMSException ex =  new JMSException("Exception when sending message");
+            ex.setLinkedException(rte);
+            throw ex;
         }
 
     }



Mime
View raw message