private ByteBuf writeError(ByteBuf buffer, Throwable t, ThreadContext context) {
    context.serializer().writeObject(t, OUTPUT.get().setByteBuf(buffer));
    return buffer;
  }
private ByteBuf writeError ( ByteBuf buffer , Throwable t , ThreadContext context ) { context . serializer ( ) . writeObject ( t , OUTPUT . get ( ) . setByteBuf ( buffer ) ) ; return buffer ; }
Writes an error to the given buffer.