![](/img/trans.png)
[英]Replacing JavaScript SockJS client with Java Vert.x client
[英]vert-x 3.3.2 http client exception handler
我正在使用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: http ://vertx.io/docs/vertx-core/js/#_making_requests
重要事项XXXNow方法无法接收异常处理程序。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.