Skip to content

Commit

Permalink
Merge pull request apache#39 from rafael-telles/fix-exception-messages
Browse files Browse the repository at this point in the history
Fix query exception message
  • Loading branch information
rafael-telles authored May 9, 2022
2 parents 7f1eeec + 792a29c commit e383cef
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ public boolean isClosed() {
*/
@FunctionalInterface
interface FlightStreamSupplier {
Future<FlightStream> get() throws SQLTimeoutException;
Future<FlightStream> get() throws SQLException;
}

private FlightStream next(final FlightStreamSupplier flightStreamSupplier) throws SQLException {
Expand All @@ -107,7 +107,7 @@ private FlightStream next(final FlightStreamSupplier flightStreamSupplier) throw
return stream;
}
} catch (final ExecutionException | InterruptedException | CancellationException e) {
throw AvaticaConnection.HELPER.wrap("Query canceled", e);
throw AvaticaConnection.HELPER.wrap(e.getMessage(), e);
}
}
return null;
Expand Down Expand Up @@ -147,7 +147,7 @@ public FlightStream next() throws SQLException {
try {
return completionService.take();
} catch (final InterruptedException e) {
throw AvaticaConnection.HELPER.wrap("Query canceled", e);
throw AvaticaConnection.HELPER.wrap(e.getMessage(), e);
}
});
}
Expand Down

0 comments on commit e383cef

Please sign in to comment.