There are several places in the codebase where NoStackTraceThrowable is used to convey a failure which does not need a stacktrace.
This isn't a big issue with the callback or futurized API, but when using the virtual threads threading model or Kotlin coroutines, it forces users to catch Throwable in their applications.
VertxException extends RuntimeException and can be created without filling the stacktrace. In fact, we already have a NoStackTraceException which extends VertxException.
In Vert.x 5, we should consider removing NoStackTraceThrowable.
There are several places in the codebase where
NoStackTraceThrowableis used to convey a failure which does not need a stacktrace.This isn't a big issue with the callback or futurized API, but when using the virtual threads threading model or Kotlin coroutines, it forces users to catch
Throwablein their applications.VertxExceptionextendsRuntimeExceptionand can be created without filling the stacktrace. In fact, we already have aNoStackTraceExceptionwhich extendsVertxException.In Vert.x 5, we should consider removing
NoStackTraceThrowable.