Skip to content

Error Handling Documentation #77

Description

@jimmyzzxhlh

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions