| 100 | |
| 101 | |
| 102 | void RemoteBlockOutputStream::write(const Block & block) |
| 103 | { |
| 104 | if (header) |
| 105 | assertBlocksHaveEqualStructure(block, header, "RemoteBlockOutputStream"); |
| 106 | |
| 107 | try |
| 108 | { |
| 109 | connection.sendData(block); |
| 110 | } |
| 111 | catch (const NetException &) |
| 112 | { |
| 113 | /// Try to get more detailed exception from server |
| 114 | auto packet_type = connection.checkPacket(); |
| 115 | if (packet_type && *packet_type == Protocol::Server::Exception) |
| 116 | { |
| 117 | Packet packet = connection.receivePacket(); |
| 118 | packet.exception->rethrow(); |
| 119 | } |
| 120 | |
| 121 | throw; |
| 122 | } |
| 123 | } |
| 124 | |
| 125 | |
| 126 | void RemoteBlockOutputStream::writePrepared(ReadBuffer & input, size_t size) |
nothing calls this directly
no test coverage detected