/**
* Writes "Currency" values.
*/
- private static void writeCurrencyValue(ByteBuffer buffer, Object value)
+ private void writeCurrencyValue(ByteBuffer buffer, Object value)
throws IOException
{
Object inValue = value;
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);
}
}
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);
}
}