| 155 | */ |
| 156 | |
| 157 | uint32_t THeaderProtocol::readMessageBegin(std::string& name, |
| 158 | TMessageType& messageType, |
| 159 | int32_t& seqId) { |
| 160 | // Read the next frame, and change protocols if needed |
| 161 | try { |
| 162 | trans_->resetProtocol(); |
| 163 | resetProtocol(); |
| 164 | } catch (const TApplicationException& ex) { |
| 165 | writeMessageBegin("", T_EXCEPTION, 0); |
| 166 | ex.write((TProtocol*)this); |
| 167 | writeMessageEnd(); |
| 168 | trans_->flush(); |
| 169 | |
| 170 | // The framing is still good, but we don't know about this protocol. |
| 171 | // In the future, this could be made a client-side only error if |
| 172 | // connection pooling is used. |
| 173 | throw ex; |
| 174 | } |
| 175 | return proto_->readMessageBegin(name, messageType, seqId); |
| 176 | } |
| 177 | |
| 178 | uint32_t THeaderProtocol::readMessageEnd() { |
| 179 | return proto_->readMessageEnd(); |
nothing calls this directly
no test coverage detected