Unify two exceptions that mean the same thing

These were historically separate due to the old flow
structure, but now they should be one exception.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=133984858
This commit is contained in:
cgoldfeder 2016-09-22 12:24:54 -07:00 committed by Ben McIlwain
parent 21a98b899c
commit 096877f03e
55 changed files with 163 additions and 211 deletions

View file

@ -42,7 +42,7 @@ public abstract class ResourceMutateFlow<R extends EppResource, C extends Single
@Override
protected final void verifyIsAllowed() throws EppException {
if (existingResource == null) {
throw new ResourceToMutateDoesNotExistException(
throw new ResourceDoesNotExistException(
new TypeInstantiator<R>(getClass()){}.getExactType(), targetId);
}
if (command.getAuthInfo() != null) {
@ -56,8 +56,8 @@ public abstract class ResourceMutateFlow<R extends EppResource, C extends Single
protected void verifyMutationAllowed() throws EppException {}
/** Resource with this id does not exist. */
public static class ResourceToMutateDoesNotExistException extends ObjectDoesNotExistException {
public ResourceToMutateDoesNotExistException(Class<?> type, String targetId) {
public static class ResourceDoesNotExistException extends ObjectDoesNotExistException {
public ResourceDoesNotExistException(Class<?> type, String targetId) {
super(type, targetId);
}
}