Skip to content

Commit 9633bf8

Browse files
committed
Improve error message as suggested in ClickHouse#1010
1 parent 86fe010 commit 9633bf8

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

clickhouse-jdbc/src/main/java/com/clickhouse/jdbc/internal/InputBasedPreparedStatement.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,8 @@ public void addBatch() throws SQLException {
316316
int nullAsDefault = getNullAsDefault();
317317
for (int i = 0, len = values.length; i < len; i++) {
318318
if (!flags[i]) {
319-
throw SqlExceptionUtils.clientError(ClickHouseUtils.format("Missing value for parameter #%d", i + 1));
319+
throw SqlExceptionUtils
320+
.clientError(ClickHouseUtils.format("Missing value for parameter #%d [%s]", i + 1, columns[i]));
320321
}
321322
ClickHouseColumn col = columns[i];
322323
ClickHouseValue val = values[i];

0 commit comments

Comments
 (0)