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:
@@ -30,6 +30,7 @@ import com.google.common.collect.Sets;
|
||||
import com.google.common.flogger.FluentLogger;
|
||||
import com.google.gerrit.common.FooterConstants;
|
||||
import com.google.gerrit.common.data.LabelType;
|
||||
import com.google.gerrit.exceptions.StorageException;
|
||||
import com.google.gerrit.extensions.registration.DynamicItem;
|
||||
import com.google.gerrit.extensions.registration.DynamicSet;
|
||||
import com.google.gerrit.extensions.registration.Extension;
|
||||
@@ -56,7 +57,6 @@ import com.google.gerrit.server.submit.CommitMergeStatus;
|
||||
import com.google.gerrit.server.submit.IntegrationException;
|
||||
import com.google.gerrit.server.submit.MergeIdenticalTreeException;
|
||||
import com.google.gerrit.server.submit.MergeSorter;
|
||||
import com.google.gwtorm.server.OrmException;
|
||||
import com.google.inject.Inject;
|
||||
import com.google.inject.assistedinject.Assisted;
|
||||
import com.google.inject.assistedinject.AssistedInject;
|
||||
@@ -237,7 +237,7 @@ public class MergeUtil {
|
||||
List<CodeReviewCommit> result = new ArrayList<>();
|
||||
try {
|
||||
result.addAll(mergeSorter.sort(toSort));
|
||||
} catch (IOException | OrmException e) {
|
||||
} catch (IOException | StorageException e) {
|
||||
throw new IntegrationException("Branch head sorting failed", e);
|
||||
}
|
||||
result.sort(CodeReviewCommit.ORDER);
|
||||
@@ -609,7 +609,7 @@ public class MergeUtil {
|
||||
private Iterable<PatchSetApproval> safeGetApprovals(ChangeNotes notes, PatchSet.Id psId) {
|
||||
try {
|
||||
return approvalsUtil.byPatchSet(notes, psId, null, null);
|
||||
} catch (OrmException e) {
|
||||
} catch (StorageException e) {
|
||||
logger.atSevere().withCause(e).log("Can't read approval records for %s", psId);
|
||||
return Collections.emptyList();
|
||||
}
|
||||
@@ -722,7 +722,7 @@ public class MergeUtil {
|
||||
throws IntegrationException {
|
||||
try {
|
||||
return !mergeSorter.sort(Collections.singleton(toMerge)).contains(toMerge);
|
||||
} catch (IOException | OrmException e) {
|
||||
} catch (IOException | StorageException e) {
|
||||
throw new IntegrationException("Branch head sorting failed", e);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user