Let the unit report failure.

git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@598 c613c5cb-e716-0410-b11b-feb51c14d237
This commit is contained in:
Michael Bayne
2008-05-18 11:19:33 +00:00
parent 19af9eb71a
commit eb6ad10295
@@ -224,7 +224,7 @@ public abstract class RatingManagerDelegate extends GameManagerDelegate
}
final int gameId = getGameId();
CrowdServer.invoker.postUnit(new RepositoryUnit("loadRatings") {
CrowdServer.invoker.postUnit(new RepositoryUnit("loadRatings(" + gameId + ")") {
public void invokePersist () throws Exception {
// map the records by player id so that we can correlate with the db results
HashIntMap<Rating> map = new HashIntMap<Rating>();
@@ -249,11 +249,6 @@ public abstract class RatingManagerDelegate extends GameManagerDelegate
_ratings.put(rating.playerId, rating);
}
}
public void handleFailure (Exception e) {
log.log(Level.WARNING, "Failed to load ratings [where=" + where() +
", id=" + gameId + "].", e);
}
});
}
@@ -264,7 +259,7 @@ public abstract class RatingManagerDelegate extends GameManagerDelegate
}
final int gameId = getGameId();
CrowdServer.invoker.postUnit(new RepositoryUnit("saveRatings") {
CrowdServer.invoker.postUnit(new RepositoryUnit("saveRatings(" + gameId + ")") {
public void invokePersist () throws Exception {
for (Rating rating : ratings) {
_repo.setRating(gameId, rating.playerId, rating.rating, rating.experience);
@@ -277,11 +272,6 @@ public abstract class RatingManagerDelegate extends GameManagerDelegate
updateRatingInMemory(gameId, rating);
}
}
public void handleFailure (Exception e) {
log.log(Level.WARNING, "Failed to update ratings [where=" + where() +
", id=" + gameId + "].", e);
}
});
}