| 106 | |
| 107 | |
| 108 | void RemoteInserter::write(Block block) |
| 109 | { |
| 110 | try |
| 111 | { |
| 112 | connection.sendData(block, /* name */"", /* scalar */false); |
| 113 | } |
| 114 | catch (const NetException &) |
| 115 | { |
| 116 | /// Try to get more detailed exception from server |
| 117 | auto packet_type = connection.checkPacket(/* timeout_microseconds */0); |
| 118 | if (packet_type && *packet_type == Protocol::Server::Exception) |
| 119 | { |
| 120 | Packet packet = connection.receivePacket(); |
| 121 | packet.exception->rethrow(); |
| 122 | } |
| 123 | |
| 124 | throw; |
| 125 | } |
| 126 | } |
| 127 | |
| 128 | |
| 129 | void RemoteInserter::writePrepared(ReadBuffer & buf, size_t size) |
nothing calls this directly
no test coverage detected