{
throw body.getChannelException(AMQConstant.NOT_FOUND, "No such exchange: " + body.getExchange());
}
exchangeRegistry.unregisterExchange(body.getExchange(), body.getIfUnused());
ExchangeDeleteOkBody responseBody = session.getMethodRegistry().createExchangeDeleteOkBody();
session.writeFrame(responseBody.generateFrame(channelId));
}
catch (ExchangeInUseException e)
{
throw body.getChannelException(AMQConstant.IN_USE, "Exchange in use");
// TODO: sort out consistent channel close mechanism that does all clean up etc.