-
Notifications
You must be signed in to change notification settings - Fork 59
Closed
Labels
Description
when I invoke from client but not connection, it's will get connection and do action in the callback. if the action throw a exception, and no exception handler of Context was setting .The exception will discard.
also see #116
Lines 115 to 129 in 12a6e6f
.whenCompleteAsync((connection, error) -> { | |
try { | |
if (error != null) { | |
logger.info("failed to create connection", error); | |
handler.handle(Future.failedFuture(error)); | |
} else { | |
handler.handle(Future.succeededFuture(connection)); | |
} | |
} catch (Throwable exception) { | |
Handler<Throwable> exceptionHandler = vertx.getOrCreateContext().exceptionHandler(); | |
if (exceptionHandler != null) { | |
exceptionHandler.handle(exception); | |
} else { | |
throw exception; | |
} |
client.queryWithParams("select * from player where id=?",JsonArray().add(1).add(2)) {
// callback never execute
}
client.getConnection() {
try {
it.queryWithParams("select * from player where id=?",JsonArray().add(1).add(2)) {
// do something
}
} catch(e : Throwable) {
//got the exception
}
}