blogSyncBlogJava = new JSONObject();
events.put(BlogSync.BLOG_SYNC_BLOGJAVA, blogSyncBlogJava);
}
} catch (final JSONException e) {
LOGGER.log(Level.SEVERE, e.getMessage(), e);
throw new EventException(e);
}
try {
final JSONObject rslt = updateArticle(event);
try {
blogSyncBlogJava.put(Keys.CODE, rslt.getString(Keys.STATUS_CODE));
} catch (final JSONException ex) {
LOGGER.log(Level.SEVERE, ex.getMessage(), ex);
throw new EventException(ex);
}
} catch (final SyncException e) {
try {
blogSyncBlogJava.put(Keys.CODE,
BlogSyncStatusCodes.BLOG_SYNC_FAIL);
blogSyncBlogJava.put(Keys.MSG, e.getMessage());
} catch (final JSONException ex) {
LOGGER.log(Level.SEVERE, ex.getMessage(), ex);
throw new EventException(ex);
}
} catch (final EventException e) {
LOGGER.log(Level.SEVERE, e.getMessage(), e);
try {
blogSyncBlogJava.put(Keys.CODE,
BlogSyncStatusCodes.BLOG_SYNC_FAIL);
blogSyncBlogJava.put(Keys.MSG, "Unknown exception :-(");
} catch (final JSONException ex) {
LOGGER.log(Level.SEVERE, ex.getMessage(), ex);
throw new EventException(ex);
}
}
}