changeset 690:f7946d36d1dd

Extend error messages with the linetype to give more info.
author Martin van Dinther <martin.van.dinther@monetdbsolutions.com>
date Wed, 16 Nov 2022 20:11:42 +0100 (2022-11-16)
parents 4d3b2cf24b30
children fb55e62c50f3
files src/main/java/org/monetdb/jdbc/MonetConnection.java
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/main/java/org/monetdb/jdbc/MonetConnection.java
+++ b/src/main/java/org/monetdb/jdbc/MonetConnection.java
@@ -2341,7 +2341,7 @@ public class MonetConnection
 		/**
 		 * Parses the given string and changes the value of the matching
 		 * header appropriately, or passes it on to the underlying
-		 * DataResponse.
+		 * DataBlockResponse.
 		 *
 		 * @param tmpLine the string that contains the header
 		 * @return a non-null String if the header cannot be parsed or
@@ -2361,7 +2361,7 @@ public class MonetConnection
 			if (linetype != LineType.HEADER) {
 				if (!isSet[TYPESIZES])
 					isSet[TYPESIZES] = true;
-				return "Header expected, got: " + tmpLine;
+				return "Header expected, got " + linetype + " line: " + tmpLine;
 			}
 
 			// depending on the name of the header, we continue
@@ -2788,7 +2788,7 @@ public class MonetConnection
 		@Override
 		public String addLine(final String line, final LineType linetype) {
 			if (linetype != LineType.RESULT)
-				return "protocol violation: unexpected line in data block: " + line;
+				return "protocol violation: unexpected " + linetype + " line in data block: " + line;
 			// add to the backing array
 			data[++pos] = line;