diff options
Diffstat (limited to 'cpp/src/qpid/broker/BrokerChannel.cpp')
| -rw-r--r-- | cpp/src/qpid/broker/BrokerChannel.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/cpp/src/qpid/broker/BrokerChannel.cpp b/cpp/src/qpid/broker/BrokerChannel.cpp index 11d8db73f8..9712b3903f 100644 --- a/cpp/src/qpid/broker/BrokerChannel.cpp +++ b/cpp/src/qpid/broker/BrokerChannel.cpp @@ -346,7 +346,9 @@ void Channel::route(Message::shared_ptr msg, Deliverable& strategy) { cacheExchange = connection.broker.getExchanges().get(routeToExchangeName); } - assert(cacheExchange.get()); + if (!cacheExchange.get() ) + throw ChannelException(404, "Exchange not found '" + routeToExchangeName + "'"); + cacheExchange->route(strategy, msg->getRoutingKey(), &(msg->getApplicationHeaders())); if (!strategy.delivered) { |
