[hornetq-commits] JBoss hornetq SVN: r9000 - trunk/src/main/org/hornetq/core/protocol/core.
do-not-reply at jboss.org
do-not-reply at jboss.org
Mon Mar 29 11:00:21 EDT 2010
Author: jmesnil
Date: 2010-03-29 11:00:20 -0400 (Mon, 29 Mar 2010)
New Revision: 9000
Modified:
trunk/src/main/org/hornetq/core/protocol/core/ServerSessionPacketHandler.java
Log:
https://jira.jboss.org/jira/browse/HORNETQ-345: Unexpected exception on the server is not reported to the client
* ensure an unexpected exception is reported to the client if the packet requires a response
Modified: trunk/src/main/org/hornetq/core/protocol/core/ServerSessionPacketHandler.java
===================================================================
--- trunk/src/main/org/hornetq/core/protocol/core/ServerSessionPacketHandler.java 2010-03-29 13:52:09 UTC (rev 8999)
+++ trunk/src/main/org/hornetq/core/protocol/core/ServerSessionPacketHandler.java 2010-03-29 15:00:20 UTC (rev 9000)
@@ -494,7 +494,16 @@
}
catch (Throwable t)
{
- log.error("Caught unexpected exception", t);
+ if (requiresResponse)
+ {
+ HornetQException hqe = new HornetQException(HornetQException.INTERNAL_ERROR);
+ hqe.initCause(t);
+ response = new HornetQExceptionMessage(hqe);
+ }
+ else
+ {
+ log.error("Caught unexpected exception", t);
+ }
}
sendResponse(packet, response, flush, closeChannel);
More information about the hornetq-commits
mailing list