Blynk-Technologies / clickhouse4j

Lighter and faster alternative for the official ClickHouse JDBC driver
Other
213 stars 38 forks source link

unable to catch any exception that occurs during copyFromDB call #103

Open ithinkcode opened 1 year ago

ithinkcode commented 1 year ago

Strange issue. I am using the copyFromDB method successfully but when an exception occurs - maybe due to wrong query or any other ch side error I am unable to "catch" the actual exception in a regular try catch block.

As per the logs this is the exception type

ERROR Error on sendStreamSQL() cc.blynk.clickhouse.except.ClickHouseUnknownException: ClickHouse exception

However if I try to catch that exception in a try catch it never gets caught !

ithinkcode commented 1 year ago

Was an issue in the clickhouse4j code where the exception returned from the clickhouse servers were getting suppressed instead of the getting pushed out.