mirror of
https://github.com/google/nomulus.git
synced 2025-05-20 03:09:33 +02:00
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:
parent
21a98b899c
commit
096877f03e
55 changed files with 163 additions and 211 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue