code: protected void writeData(@NotNull Bytes inBytes, @NotNull WriteMarshallable c) {
          outWire.writeDocument(false, out -> {
              final long readPosition = inBytes.readPosition();
              final long position = outWire.bytes().writePosition();
              try {
                  c.writeMarshallable(outWire);
              } catch (Throwable t) {
                  inBytes.readPosition(readPosition);
                  if (LOG.isInfoEnabled())
                      LOG.info("While reading " + inBytes.toDebugString(),
                              " processing wire " + c, t);
                  outWire.bytes().writePosition(position);
                  outWire.writeEventName(() -> "exception").throwable(t);
              }
  
              // write 'reply : {} ' if no data was sent
              if (position == outWire.bytes().writePosition()) {
                  outWire.writeEventName(reply).marshallable(EMPTY);
              }
          });
  
          logYaml(outWire);
      }
docs: write and exceptions and rolls back if no data was written