Skip to content

Commit

Permalink
CLDR-16532 Ignore missing hidden notifications table if db is too old (
Browse files Browse the repository at this point in the history
…unicode-org#2834)

-Avoid throwing exception with db before version 42, for testing other features than hidden notifications

-Earlier versions had versioned tables like cldr_dash_hide_41 or cldr_review_hide_38
  • Loading branch information
btangmu authored Apr 4, 2023
1 parent 3cb38d3 commit 7502cce
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,11 @@ private void getData() {
this.hiddenNotifications.put(subtype, xpstrid, val);
}
} catch (SQLException sqe) {
SurveyLog.logException(sqe, "Getting hidden notifications for uid#" + userId + " in " + localeId, null);
throw new InternalError("Error getting hidden notifications: " + sqe.getMessage());
// first version with cldr_dash_hide table is 42; silently ignore exceptions for earlier versions
if (Integer.parseInt(SurveyMain.getNewVersion()) >= 42) {
SurveyLog.logException(sqe, "Getting hidden notifications for uid#" + userId + " in " + localeId, null);
throw new InternalError("Error getting hidden notifications: " + sqe.getMessage());
}
} finally {
DBUtils.close(rs, s, conn);
}
Expand Down

0 comments on commit 7502cce

Please sign in to comment.