diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/java/com/healthmarketscience/jackcess/Column.java | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/java/com/healthmarketscience/jackcess/Column.java b/src/java/com/healthmarketscience/jackcess/Column.java index bf14d12..dde0985 100644 --- a/src/java/com/healthmarketscience/jackcess/Column.java +++ b/src/java/com/healthmarketscience/jackcess/Column.java @@ -608,8 +608,9 @@ public class Column implements Comparable<Column> { // check precision if(decVal.precision() > getPrecision()) { - throw new IOException("Numeric value is too big for specified precision " - + getPrecision() + ": " + decVal); + throw new IOException( + "Numeric value is too big for specified precision " + + getPrecision() + ": " + decVal); } // convert to unscaled BigInteger, big-endian bytes @@ -741,7 +742,9 @@ public class Column implements Comparable<Column> { int remainingRowLength) throws IOException { if(value.length > getType().getMaxSize()) { - throw new IOException("value too big for column"); + throw new IOException("value too big for column, max " + + getType().getMaxSize() + ", got " + + value.length); } // determine which type to write @@ -905,7 +908,8 @@ public class Column implements Comparable<Column> { CharSequence text = toCharSequence(obj); int maxChars = getLengthInUnits(); if (text.length() > maxChars) { - throw new IOException("Text is too big for column"); + throw new IOException("Text is too big for column, max " + maxChars + + ", got " + text.length()); } byte[] encodedData = encodeUncompressedText(text, getFormat()).array(); obj = encodedData; |