Hi,
Is there any documentation in terms of how exceptions should be handled? If I understand it correctly SqlException is wrapped into FluentJdbcSqlException, so to catch an exception it would be something like:
DataSource dataSource = ...
FluentJdbc fluentJdbc = new FluentJdbcBuilder()
.connectionProvider(dataSource)
.build();
String queryString = ...
try {
fluentJdbc.query().update(queryString).run();
} catch (FluentJdbcSqlException e) {
...
}
I'm not using the error handler as it is possible that the exception needs to be re-thrown and there is no way to re-throw an exception in a lambda statement.
Thanks for making this library, it makes JDBC SQL queries a lot cleaner!
Hi,
Is there any documentation in terms of how exceptions should be handled? If I understand it correctly
SqlExceptionis wrapped intoFluentJdbcSqlException, so to catch an exception it would be something like:I'm not using the error handler as it is possible that the exception needs to be re-thrown and there is no way to re-throw an exception in a lambda statement.
Thanks for making this library, it makes JDBC SQL queries a lot cleaner!