vert.x icon indicating copy to clipboard operation
vert.x copied to clipboard

Use of NoStackTraceThrowable

Open kolstae opened this issue 4 years ago • 1 comments

When using kotlin coroutines the use of NoStackTraceThrowable causes problems that are really hard to find.

This code will not catch the error

    try {
        pool.preparedQuery("select true = $1").execute(Tuple.of(12)).await()
    } catch (e: Exception) {
        LOG.error("Expected: {}", e.toString())
    }

to catch the error we would need to catch Throwable which forces us to check if it's an Error. When using futures directly, this isn't as much of a problem I guess.

kolstae avatar Aug 26 '21 13:08 kolstae

Vote for issue https://github.com/eclipse-vertx/vert.x/issues/4854

PS: https://github.com/eclipse-vertx/vert.x/pull/4855

magicprinc avatar Sep 12 '23 13:09 magicprinc