aboutsummaryrefslogtreecommitdiffstats
path: root/config-model/src/main/java/com/yahoo/searchdefinition/SDDocumentTypeOrderer.java
diff options
context:
space:
mode:
Diffstat (limited to 'config-model/src/main/java/com/yahoo/searchdefinition/SDDocumentTypeOrderer.java')
-rw-r--r--config-model/src/main/java/com/yahoo/searchdefinition/SDDocumentTypeOrderer.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/config-model/src/main/java/com/yahoo/searchdefinition/SDDocumentTypeOrderer.java b/config-model/src/main/java/com/yahoo/searchdefinition/SDDocumentTypeOrderer.java
index aa43c00f461..ba34045e7de 100644
--- a/config-model/src/main/java/com/yahoo/searchdefinition/SDDocumentTypeOrderer.java
+++ b/config-model/src/main/java/com/yahoo/searchdefinition/SDDocumentTypeOrderer.java
@@ -76,12 +76,12 @@ public class SDDocumentTypeOrderer {
SDDocumentType inherited;
if (type.isStruct()) {
inherited = owningDocument.allTypes().get(new NewDocumentType.Name(name.getName()));
- if (inherited == null) throw new IllegalStateException("Struct '" + name + "' not found in " + owningDocument);
+ if (inherited == null) throw new IllegalArgumentException("Struct '" + name + "' not found in " + owningDocument);
process(inherited, owningDocument);
}
else {
inherited = createdSDTypes.get(name);
- if (inherited == null) throw new IllegalStateException("Document type '" + name + "' not found");
+ if (inherited == null) throw new IllegalArgumentException("Document type '" + name + "' not found");
process(inherited, inherited);
}
type.inherit(inherited);