Repository: quarkusio/quarkus
Issue: Exceptions ignored when writing repsonse with VertxBlockingOutput.java

### Describe the bug

I am using StreamingOutput to send large response body to the client.  If the client closes the connection while the server is writing the server will not get any exception and the  data written by the server will vanish into the aether.

- This happens in all versions after Quarkus 2.0.0.
- This does not happen for HTTP/2.
- This hapens when using the blocking call.

I believe that I have tracked this down to the io.quarkus.resteasy.runtime.standalone.VertxBlockingOutput.java:82 (`request.response().write(createBuffer(data));`)

The whole method is:

```
@Override
    public void write(ByteBuf data, boolean last) throws IOException {
        if (last && data == null) {
            request.response().end();
            return;
        }
        try {
            //do all this in the same lock
            synchronized (request.connection()) {
                try {
                    awaitWriteable();
                    if (last) {
                        request.response().end(createBuffer(data));
                    } else {
                        request.response().write(createBuffer(data));
                    }
                } catch (Exception e) {
                    if (data != null && data.refCnt() > 0) {
                        data.release();
                    }
                    throw new IOException("Failed to write", e);
                }
            }
        } finally {
            if (last) {
                terminateResponse();
            }
        }
    }
```

To me it looks like after the Vert.x 4 update the exception handling is missing.  After the update to 4 the `request.response().write` does not throw an exception but returns a Vertx future that needs to be checked for success/failure/throwable.

### Expected behavior

When the client closes the connection while the server is writing the response we should get:

`new IOException("Failed to write", e)`

### Actual behavior

When the client closes the connection while the server is writing the response  we get no exception and the server just continues to write its output to the aether.

### How to Reproduce?

I don't have a code example but:
1. Setup up server that returns large output as StreamingOutput (maybe infinite output).
2. Connect with the client using HTTP/1.1 and call the method.
3. Kill the client.
4. Notice the server method will just continue to write to the StreamingOutput without getting the expected error.

### Output of `uname -a` or `ver`

Darwin RKV-MBP-Gisli.local 20.6.0 Darwin Kernel Version 20.6.0: Wed Jun 23 00:26:31 PDT 2021; root:xnu-7195.141.2~5/RELEASE_X86_64 x86_64

### Output of `java -version`

openjdk version "11.0.10" 2021-01-19

### GraalVM version (if different from Java)

_No response_

### Quarkus version or git rev

2.2.3.Final

### Build tool (ie. output of `mvnw --version` or `gradlew --version`)

_No response_

### Additional information

_No response_

Changed files:
extensions/resteasy-classic/resteasy/runtime/src/main/java/io/quarkus/resteasy/runtime/standalone/VertxBlockingOutput.java

diff --git a/extensions/resteasy-classic/resteasy/runtime/src/main/java/io/quarkus/resteasy/runtime/standalone/VertxBlockingOutput.java b/extensions/resteasy-classic/resteasy/runtime/src/main/java/io/quarkus/resteasy/runtime/standalone/VertxBlockingOutput.java
index 998817a1ccb..b8801e241e0 100644
--- a/extensions/resteasy-classic/resteasy/runtime/src/main/java/io/quarkus/resteasy/runtime/standalone/VertxBlockingOutput.java
+++ b/extensions/resteasy-classic/resteasy/runtime/src/main/java/io/quarkus/resteasy/runtime/standalone/VertxBlockingOutput.java
@@ -69,8 +69,15 @@ Buffer createBuffer(ByteBuf data) {
     public void write(ByteBuf data, boolean last) throws IOException {
         if (last && data == null) {
             request.response().end();
+            //if there is a problem we still try and end, but then throw to report to the caller
+            if (throwable != null) {
+                throw new IOException(throwable);
+            }
             return;
         }
+        if (throwable != null) {
+            throw new IOException(throwable);
+        }
         try {
             //do all this in the same lock
             synchronized (request.connection()) {