changeset 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 e068d2039e14
children 73dbd211a3ba
files src/main/java/org/monetdb/jdbc/MonetConnection.java
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/main/java/org/monetdb/jdbc/MonetConnection.java
+++ b/src/main/java/org/monetdb/jdbc/MonetConnection.java
@@ -3260,8 +3260,8 @@ public class MonetConnection
 		try {
 			downloadHandler.handleDownload(handle, path, true);
 			if (!handle.hasBeenUsed()) {
-				String message = "Call to " + downloadHandler.getClass().getCanonicalName() + ".handleDownload for path '" + path + "' sent neither data nor an error message";
-				throw new IOException(message);
+				String message = "Call to " + downloadHandler.getClass().getSimpleName() + ".handleDownload sent neither data nor error";
+				handle.sendError(message);
 			}
 		} finally {
 			handle.close();