vert.x
vert.x copied to clipboard
Use of NoStackTraceThrowable
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.
Vote for issue https://github.com/eclipse-vertx/vert.x/issues/4854
PS: https://github.com/eclipse-vertx/vert.x/pull/4855