Skip to content

Commit

Permalink
Use NoStackTraceException in metrics
Browse files Browse the repository at this point in the history
This is done because the stacktrace
produced is completely useless
and only makes it harder to focus on
the real problem

Relates to: quarkiverse/quarkus-langchain4j#140
  • Loading branch information
geoand committed Dec 13, 2023
1 parent 1825141 commit 542e93b
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import io.vertx.core.datagram.DatagramSocketOptions;
import io.vertx.core.http.HttpClientOptions;
import io.vertx.core.http.HttpServerOptions;
import io.vertx.core.impl.NoStackTraceException;
import io.vertx.core.metrics.MetricsOptions;
import io.vertx.core.net.NetClientOptions;
import io.vertx.core.net.NetServerOptions;
Expand Down Expand Up @@ -60,7 +61,7 @@ public MetricsOptions newOptions() {
@Override
public HttpServerMetrics<?, ?, ?> createHttpServerMetrics(HttpServerOptions options, SocketAddress localAddress) {
if (httpBinderConfiguration == null) {
throw new IllegalStateException("HttpBinderConfiguration was not found");
throw new NoStackTraceException("HttpBinderConfiguration was not found");
}
if (httpBinderConfiguration.isServerEnabled()) {
log.debugf("Create HttpServerMetrics with options %s and address %s", options, localAddress);
Expand Down

0 comments on commit 542e93b

Please sign in to comment.