User: dmaplesden
Date: 01/08/29 15:45:59
Modified: src/main/org/jboss/mq/server JMSServer.java
ClientConsumer.java
Log:
Change "destination does not exist" error messages to include the name of the
destination it didn't find.
Revision Changes Path
1.5 +7 -7 jbossmq/src/main/org/jboss/mq/server/JMSServer.java
Index: JMSServer.java
===================================================================
RCS file: /cvsroot/jboss/jbossmq/src/main/org/jboss/mq/server/JMSServer.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- JMSServer.java 2001/08/18 00:07:49 1.4
+++ JMSServer.java 2001/08/29 22:45:58 1.5
@@ -36,7 +36,7 @@
* @author Hiram Chirino ([EMAIL PROTECTED])
* @author David Maplesden ([EMAIL PROTECTED])
* @created August 16, 2001
- * @version $Revision: 1.4 $
+ * @version $Revision: 1.5 $
*/
public class JMSServer {
@@ -242,7 +242,7 @@
throws JMSException {
JMSDestination queue = ( JMSDestination )destinations.get(
val.getJMSDestination() );
if ( queue == null ) {
- throw new JMSException( "This destination does not exist !" );
+ throw new JMSException( "The destination "+val.getJMSDestination()+" does
not exist !" );
}
//Add the message to the queue
@@ -413,10 +413,10 @@
JMSDestination queue = ( JMSDestination )destinations.get( dest );
if ( queue == null ) {
- throw new JMSException( "That destination does not exist" );
+ throw new JMSException( "The destination "+dest+" does not exist" );
}
if ( !( queue instanceof JMSQueue ) ) {
- throw new JMSException( "That destination is not a queue" );
+ throw new JMSException( "The destination "+dest+" is not a queue" );
}
return ( ( JMSQueue )queue ).browse( selector );
@@ -434,7 +434,7 @@
SpyQueue newQueue = new SpyQueue( name );
if ( !destinations.containsKey( newQueue ) ) {
- throw new JMSException( "This destination does not exist !" );
+ throw new JMSException( "The destination "+newQueue+" does not exist !" );
}
return newQueue;
}
@@ -445,7 +445,7 @@
SpyTopic newTopic = new SpyTopic( name );
if ( !destinations.containsKey( newTopic ) ) {
- throw new JMSException( "This destination does not exist !" );
+ throw new JMSException( "The destination "+newTopic+" does not exist !" );
}
return newTopic;
}
@@ -485,7 +485,7 @@
public void restoreMessage( SpyMessage message ) {
JMSDestination queue = ( JMSDestination )destinations.get(
message.getJMSDestination() );
if ( queue == null ) {
- throw new RuntimeException( "This destination does not exist!" );
+ throw new RuntimeException( "The destination
"+message.getJMSDestination()+" does not exist!" );
}
//Add the message to the queue
queue.restoreMessage( message );
1.5 +4 -4 jbossmq/src/main/org/jboss/mq/server/ClientConsumer.java
Index: ClientConsumer.java
===================================================================
RCS file: /cvsroot/jboss/jbossmq/src/main/org/jboss/mq/server/ClientConsumer.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- ClientConsumer.java 2001/08/17 03:04:06 1.4
+++ ClientConsumer.java 2001/08/29 22:45:58 1.5
@@ -25,7 +25,7 @@
*
* @author Hiram Chirino ([EMAIL PROTECTED])
* @created August 16, 2001
- * @version $Revision: 1.4 $
+ * @version $Revision: 1.5 $
*/
public class ClientConsumer implements Runnable {
//The JMSServer object
@@ -97,7 +97,7 @@
JMSDestination jmsdest = ( JMSDestination )server.getJMSDestination(
req.destination );
if ( jmsdest == null ) {
- throw new JMSException( "This destination does not exist !" );
+ throw new JMSException( "The destination "+req.destination+" does not
exist !" );
}
jmsdest.addSubscriber( req );
@@ -141,7 +141,7 @@
JMSDestination queue = server.getJMSDestination( req.destination );
if ( queue == null ) {
- throw new JMSException( "The subscription's destination does not exist" );
+ throw new JMSException( "The subscription's destination
"+req.destination+" does not exist" );
}
if ( enabled ) {
@@ -243,7 +243,7 @@
JMSDestination queue = server.getJMSDestination( sub.destination );
if ( queue == null ) {
- throw new JMSException( "The subscription's destination does not exist" );
+ throw new JMSException( "The subscription's destination
"+sub.destination+" does not exist" );
}
queue.acknowledge( request, sub, txId );
_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-development