This is an automated email from the ASF dual-hosted git repository. davsclaus pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/camel.git
commit ce48dea0a753f19da9f691b38f93b008e632b1ae Author: Claus Ibsen <claus.ib...@gmail.com> AuthorDate: Wed Feb 3 06:17:37 2021 +0100 Polished --- .../org/apache/camel/component/vertx/http/VertxHttpProducer.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/components/camel-vertx-http/src/main/java/org/apache/camel/component/vertx/http/VertxHttpProducer.java b/components/camel-vertx-http/src/main/java/org/apache/camel/component/vertx/http/VertxHttpProducer.java index b7360cd..51e7412 100644 --- a/components/camel-vertx-http/src/main/java/org/apache/camel/component/vertx/http/VertxHttpProducer.java +++ b/components/camel-vertx-http/src/main/java/org/apache/camel/component/vertx/http/VertxHttpProducer.java @@ -32,7 +32,6 @@ import org.apache.camel.AsyncCallback; import org.apache.camel.CamelExchangeException; import org.apache.camel.Exchange; import org.apache.camel.Message; -import org.apache.camel.RuntimeCamelException; import org.apache.camel.support.DefaultAsyncProducer; import org.apache.camel.util.ObjectHelper; import org.apache.camel.util.URISupport; @@ -57,11 +56,10 @@ public class VertxHttpProducer extends DefaultAsyncProducer { @Override public boolean process(Exchange exchange, AsyncCallback callback) { - VertxHttpConfiguration configuration = getEndpoint().getConfiguration(); Message message = exchange.getMessage(); try { - VertxHttpBinding vertxHttpBinding = configuration.getVertxHttpBinding(); + VertxHttpBinding vertxHttpBinding = getEndpoint().getConfiguration().getVertxHttpBinding(); HttpRequest<Buffer> request = vertxHttpBinding.prepareHttpRequest(getEndpoint(), exchange); Handler<AsyncResult<HttpResponse<Buffer>>> resultHandler = createResultHandler(exchange, callback); @@ -132,7 +130,7 @@ public class VertxHttpProducer extends DefaultAsyncProducer { VertxHttpBinding vertxHttpBinding = endpoint.getConfiguration().getVertxHttpBinding(); vertxHttpBinding.handleResponse(endpoint, exchange, response); } catch (Exception e) { - throw new RuntimeCamelException(e); + exchange.setException(e); } finally { callback.done(false); }