void SessionHandler::handleException(const qpid::SessionException& e) { QPID_LOG(error, "Execution exception (during output): " << e.what()); executionException(e.code, e.what()); // Let subclass handle this first. framing::AMQP_AllProxy::Execution execution(channel); execution.exception(e.code, 0, 0, 0, 0, e.what(), FieldTable()); detaching(); sendDetach(); }
void SessionImpl::rethrow(const qpid::SessionException& e) { switch (e.code) { case framing::execution::ERROR_CODE_NOT_ALLOWED: case framing::execution::ERROR_CODE_UNAUTHORIZED_ACCESS: throw messaging::UnauthorizedAccess(e.what()); case framing::execution::ERROR_CODE_NOT_FOUND: case framing::execution::ERROR_CODE_RESOURCE_DELETED: throw messaging::NotFound(e.what()); default: throw SessionError(e.what()); } }