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

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