Rename OrmException to StorageException and move to exceptions package

Subclasses are also renamed:
 * OrmDuplicateKeyException -> DuplicateKeyException
 * OrmRuntimeException -> StorageRuntimeException

Change-Id: I0e934f177e98667ec7cb9912f246ac649a4efd99
This commit is contained in:
Dave Borowitz
2019-01-15 18:45:22 -08:00
parent 9dd73c8a71
commit 62f32fcfd6
500 changed files with 1973 additions and 1941 deletions

View File

@@ -15,6 +15,7 @@
package com.google.gerrit.server.restapi.change;
import com.google.common.flogger.FluentLogger;
import com.google.gerrit.exceptions.StorageException;
import com.google.gerrit.extensions.common.Input;
import com.google.gerrit.extensions.restapi.Response;
import com.google.gerrit.extensions.restapi.RestModifyView;
@@ -22,7 +23,6 @@ import com.google.gerrit.extensions.webui.UiAction;
import com.google.gerrit.server.StarredChangesUtil;
import com.google.gerrit.server.StarredChangesUtil.IllegalLabelException;
import com.google.gerrit.server.change.ChangeResource;
import com.google.gwtorm.server.OrmException;
import com.google.inject.Inject;
import com.google.inject.Singleton;
@@ -47,7 +47,7 @@ public class Unignore implements RestModifyView<ChangeResource, Input>, UiAction
@Override
public Response<String> apply(ChangeResource rsrc, Input input)
throws OrmException, IllegalLabelException {
throws StorageException, IllegalLabelException {
if (isIgnored(rsrc)) {
stars.unignore(rsrc);
}
@@ -57,7 +57,7 @@ public class Unignore implements RestModifyView<ChangeResource, Input>, UiAction
private boolean isIgnored(ChangeResource rsrc) {
try {
return stars.isIgnored(rsrc);
} catch (OrmException e) {
} catch (StorageException e) {
logger.atSevere().withCause(e).log("failed to check ignored star");
}
return false;