From b60366623ebdd7ce72798cb7fc4e40fa8e0cacc8 Mon Sep 17 00:00:00 2001 From: James Ahlborn Date: Fri, 13 Mar 2015 13:11:06 +0000 Subject: [PATCH] missed a few more error context usages git-svn-id: https://svn.code.sf.net/p/jackcess/code/jackcess/trunk@920 f203690c-595d-4dc9-a70b-905162fa7fd2 --- .../jackcess/impl/CalculatedColumnUtil.java | 3 ++- .../com/healthmarketscience/jackcess/impl/ColumnImpl.java | 8 +++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/healthmarketscience/jackcess/impl/CalculatedColumnUtil.java b/src/main/java/com/healthmarketscience/jackcess/impl/CalculatedColumnUtil.java index 3b528f5..8cc25da 100644 --- a/src/main/java/com/healthmarketscience/jackcess/impl/CalculatedColumnUtil.java +++ b/src/main/java/com/healthmarketscience/jackcess/impl/CalculatedColumnUtil.java @@ -351,7 +351,8 @@ class CalculatedColumnUtil } catch(ArithmeticException e) { throw (IOException) - new IOException("Numeric value '" + inValue + "' out of range") + new IOException(withErrorContext( + "Numeric value '" + inValue + "' out of range")) .initCause(e); } } diff --git a/src/main/java/com/healthmarketscience/jackcess/impl/ColumnImpl.java b/src/main/java/com/healthmarketscience/jackcess/impl/ColumnImpl.java index 676af4d..c049396 100644 --- a/src/main/java/com/healthmarketscience/jackcess/impl/ColumnImpl.java +++ b/src/main/java/com/healthmarketscience/jackcess/impl/ColumnImpl.java @@ -658,7 +658,7 @@ public class ColumnImpl implements Column, Comparable { /** * Writes "Currency" values. */ - private static void writeCurrencyValue(ByteBuffer buffer, Object value) + private void writeCurrencyValue(ByteBuffer buffer, Object value) throws IOException { Object inValue = value; @@ -675,7 +675,8 @@ public class ColumnImpl implements Column, Comparable { buffer.putLong(decVal.movePointRight(4).longValueExact()); } catch(ArithmeticException e) { throw (IOException) - new IOException("Currency value '" + inValue + "' out of range") + new IOException(withErrorContext( + "Currency value '" + inValue + "' out of range")) .initCause(e); } } @@ -750,7 +751,8 @@ public class ColumnImpl implements Column, Comparable { buffer.put(intValBytes); } catch(ArithmeticException e) { throw (IOException) - new IOException("Numeric value '" + inValue + "' out of range") + new IOException(withErrorContext( + "Numeric value '" + inValue + "' out of range")) .initCause(e); } } -- 2.39.5