vert-x3 / vertx-mysql-postgresql-client

This client is deprecated - use instead
https://github.com/eclipse-vertx/vertx-sql-client
Apache License 2.0
117 stars 59 forks source link

Backported `Catch the exception thrown by the synchronization` to 3.6 #152

Closed okou19900722 closed 5 years ago

okou19900722 commented 5 years ago

fixed #151

codepitbull commented 5 years ago

Can you provide a test for the situation you are trying to solve with this change?

okou19900722 commented 5 years ago
  @Test
  public void test(TestContext context){
    JsonArray arr = new JsonArray().add(1).add(2);
    Async async = context.async();
    client.queryWithParams("?", arr, r -> {
      context.assertTrue(r.failed());
      context.assertTrue(r.cause() instanceof InsufficientParametersException);
      async.complete();
    });
  }

https://github.com/jasync-sql/jasync-sql/blob/8e168f442b3175c102bdbeb8e6e706f24962fe8a/mysql-async/src/main/java/com/github/jasync/sql/db/mysql/MySQLConnection.kt#L288-L301

okou19900722 commented 5 years ago

Callback will never be called before modification

codepitbull commented 5 years ago

I will review everything this weekend to make sure this doesn't introduce breaking changes for current users. Thanks for your effort :)

okou19900722 commented 5 years ago

Hi @codepitbull , have you reviewed yet? It's a terrible problem. can you merge #156 before 3.7.1 release?

codepitbull commented 5 years ago

Yes, I already merged the other one. Merging this now. Sorry for the delay.