summaryrefslogtreecommitdiff
path: root/qpid/dotnet/Qpid.Client/Client/Handler/ChannelCloseMethodHandler.cs
diff options
context:
space:
mode:
authorTomas Restrepo <tomasr@apache.org>2007-05-10 23:02:46 +0000
committerTomas Restrepo <tomasr@apache.org>2007-05-10 23:02:46 +0000
commitcac9db624b611981e9d8ecf64561fe7ed7e173a6 (patch)
tree62a01b26d41e0ff72fe32807bfb48fd3d3d3032c /qpid/dotnet/Qpid.Client/Client/Handler/ChannelCloseMethodHandler.cs
parent4477307192b9a5fd46e6f9e91ab4299a1b7abbd3 (diff)
downloadqpid-python-cac9db624b611981e9d8ecf64561fe7ed7e173a6.tar.gz
Merged revisions 537015-537026 via svnmerge from
https://svn.apache.org/repos/asf/incubator/qpid/branches/M2 ........ r537015 | tomasr | 2007-05-10 17:16:49 -0500 (Thu, 10 May 2007) | 1 line QPID-435: Fix HeadersExchangeTest ........ r537019 | tomasr | 2007-05-10 17:25:01 -0500 (Thu, 10 May 2007) | 1 line QPID-441 Fix handling of bounced messages ........ r537026 | tomasr | 2007-05-10 17:46:46 -0500 (Thu, 10 May 2007) | 1 line QPID-398 SSL support for .NET client ........ git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk@537031 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/dotnet/Qpid.Client/Client/Handler/ChannelCloseMethodHandler.cs')
-rw-r--r--qpid/dotnet/Qpid.Client/Client/Handler/ChannelCloseMethodHandler.cs15
1 files changed, 12 insertions, 3 deletions
diff --git a/qpid/dotnet/Qpid.Client/Client/Handler/ChannelCloseMethodHandler.cs b/qpid/dotnet/Qpid.Client/Client/Handler/ChannelCloseMethodHandler.cs
index 0ce8a393c9..7f88dd8219 100644
--- a/qpid/dotnet/Qpid.Client/Client/Handler/ChannelCloseMethodHandler.cs
+++ b/qpid/dotnet/Qpid.Client/Client/Handler/ChannelCloseMethodHandler.cs
@@ -44,11 +44,20 @@ namespace Qpid.Client.Handler
AMQFrame frame = ChannelCloseOkBody.CreateAMQFrame(evt.ChannelId);
evt.ProtocolSession.WriteFrame(frame);
- // HACK
+
if ( errorCode != AMQConstant.REPLY_SUCCESS.Code )
{
- _logger.Debug("Channel close received with errorCode " + errorCode + ", throwing exception");
- evt.ProtocolSession.AMQConnection.ExceptionReceived(new AMQChannelClosedException(errorCode, "Error: " + reason));
+ _logger.Debug("Channel close received with errorCode " + errorCode + ", throwing exception");
+ if ( errorCode == AMQConstant.NO_CONSUMERS.Code )
+ throw new AMQNoConsumersException(reason);
+ if ( errorCode == AMQConstant.NO_ROUTE.Code )
+ throw new AMQNoRouteException(reason);
+ if ( errorCode == AMQConstant.INVALID_ARGUMENT.Code )
+ throw new AMQInvalidArgumentException(reason);
+ if ( errorCode == AMQConstant.INVALID_ROUTING_KEY.Code )
+ throw new AMQInvalidRoutingKeyException(reason);
+ // any other
+ throw new AMQChannelClosedException(errorCode, "Error: " + reason);
}
evt.ProtocolSession.ChannelClosed(evt.ChannelId, errorCode, reason);
}