Javascript vert-x 3.3.2 http客户端异常处理程序

Javascript vert-x 3.3.2 http客户端异常处理程序,javascript,java,exception-handling,vert.x,asynchttpclient,Javascript,Java,Exception Handling,Vert.x,Asynchttpclient,Am使用Vert-x 3.3.2 HttpClient.exceptionHandler和HttpClientRequest.exceptionHandler正在引发编译错误 是否为此类删除异常处理程序 还有别的办法吗 var client = vertx.createHttpClient(options); var request = client.getNow(8080, "localhost", data, function (resp) { r

Am使用Vert-x 3.3.2

HttpClient.exceptionHandler和HttpClientRequest.exceptionHandler正在引发编译错误

是否为此类删除异常处理程序

还有别的办法吗

    var client = vertx.createHttpClient(options);
    var request = client.getNow(8080, "localhost", data, function (resp)  {

            resp.bodyHandler(function (body) {
                console.log(body.toString());
            });
            resp.exceptionHandler(function(err){
                console.log("Response Exception:::"+err.getCode());
            });

    });
    request.exceptionHandler(function(Err){
        console.log("Client Exception ::: "+Err);
    });
也试过

    client.exceptionHandler(function(Err){
        console.log("Client Exception ::: "+Err);
    });
有人能帮上忙吗。

您正在使用getNow()方法。 xxxNow()方法不接收exceptionHandler:

重要信息XXXNow方法无法接收异常处理程序

您正在使用getNow()方法。 xxxNow()方法不接收exceptionHandler:

重要信息XXXNow方法无法接收异常处理程序


谢谢索申的回复。那么如何抓住这里的例外。谢谢索申。。这实际上解决了我的问题。非常感谢。谢谢索申的回复。那么如何抓住这里的例外。谢谢索申。。这实际上解决了我的问题。非常感谢你。