Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Java] Normalize exceptions to AdbcException subclasses #2237

Open
laurentgo opened this issue Oct 9, 2024 · 0 comments · May be fixed by #2247
Open

[Java] Normalize exceptions to AdbcException subclasses #2237

laurentgo opened this issue Oct 9, 2024 · 0 comments · May be fixed by #2247
Labels
Type: enhancement New feature or request

Comments

@laurentgo
Copy link
Contributor

What feature or improvement would you like to see?

Although most Adbc methods throws AdbcException, there are several places in ADBC interfaces where methods throws Exception (notably for close() methods) or IOException. Similar to JDBC API, all exceptions should be normalized around AdbcException to make API consistent.

It would be an incompatible API change though. When updating methods from Exception to AdbcException, this would be a source incompatible change but a binary compatible one. However when changing from IOException to AdbcException, it would be a source and binary incompatible change.

@laurentgo laurentgo added the Type: enhancement New feature or request label Oct 9, 2024
laurentgo added a commit to laurentgo/arrow-adbc that referenced this issue Oct 14, 2024
ADBC base classes/interfaces are not consistent in using `AdbcException`
for all their methods (sometimes `Exception` or `IOException` are used).

Introduces `AdbcCloseable` which is a subinterface of `AutoCloseable`
throwing `AdbcException` instead of `Exception` and replace usage of
`AutoCloseable` in core interfaces with `AdbcCloseable`

Also replaces use of `IOException` in `QueryResult` with
`AdbcException`.

Fixes apache#2237
@github-actions github-actions bot added this to the ADBC Libraries 15 milestone Oct 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants