eclipse-vertx / vertx-sql-client

High performance reactive SQL Client written in Java
Apache License 2.0
877 stars 195 forks source link

PgSubscriberImpl silently does not register exception handler #1404

Open andreas-eberle opened 5 months ago

andreas-eberle commented 5 months ago

Problem

When you try to regiser an exception handler in PgSubscriberImpl, the handler is never registered. See https://github.com/eclipse-vertx/vertx-sql-client/blob/master/vertx-pg-client/src/main/java/io/vertx/pgclient/impl/pubsub/PgSubscriberImpl.java#L273

There is also no UnsupportedOperationException or any log to make the caller aware that this method is not doing anything right now. This is dangerous, because you think you have registered an exception handler, but in fact you have not and you will never be able to handle exceptions this way.

Version

master

vietj commented 5 months ago

Actually I think exception handler in this case would not report anything useful, as this is a subscription and the class itself only relay notifications. What do you have in mind ?