# HG changeset patch
# User Martin van Dinther <martin.van.dinther@monetdbsolutions.com>
# Date 1668625902 -3600
# Node ID f7946d36d1ddb9a8544f9e2aaf0e2c5b6d658bd8
# Parent  4d3b2cf24b30718d9ce7f49e03222b7a9068be22
Extend error messages with the linetype to give more info.

diff --git a/src/main/java/org/monetdb/jdbc/MonetConnection.java b/src/main/java/org/monetdb/jdbc/MonetConnection.java
--- 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;