comparison src/main/java/org/monetdb/jdbc/MonetConnection.java @ 568:b4d29515c22e onclient

Downgrade "neither data nor error" from IOException to error We haven't sent anything to the server yet so we can try to send an error.
author Joeri van Ruth <joeri.van.ruth@monetdbsolutions.com>
date Mon, 04 Oct 2021 10:57:00 +0200 (2021-10-04)
parents eeea18f501b3
children 095e896f9d7a
comparison
equal deleted inserted replaced
567:e068d2039e14 568:b4d29515c22e
3258 3258
3259 Download handle = new Download(server); 3259 Download handle = new Download(server);
3260 try { 3260 try {
3261 downloadHandler.handleDownload(handle, path, true); 3261 downloadHandler.handleDownload(handle, path, true);
3262 if (!handle.hasBeenUsed()) { 3262 if (!handle.hasBeenUsed()) {
3263 String message = "Call to " + downloadHandler.getClass().getCanonicalName() + ".handleDownload for path '" + path + "' sent neither data nor an error message"; 3263 String message = "Call to " + downloadHandler.getClass().getSimpleName() + ".handleDownload sent neither data nor error";
3264 throw new IOException(message); 3264 handle.sendError(message);
3265 } 3265 }
3266 } finally { 3266 } finally {
3267 handle.close(); 3267 handle.close();
3268 } 3268 }
3269 return handle.getError(); 3269 return handle.getError();