* @param e the originating exception
*/
private void wrapException(String message, final JSONException e) {
message = "Error writing " + message + " to JSON";
if (e.getCause() instanceof IOException) {
throw new FudgeRuntimeIOException(message, (IOException) e.getCause());
} else {
throw new FudgeRuntimeException(message, e);
}
}