diff options
author | Jon Bratseth <bratseth@gmail.com> | 2022-11-28 09:43:20 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-28 09:43:20 +0100 |
commit | 23ac0707810bed54b0b17e1c9b25a1832c52f014 (patch) | |
tree | ee3c1d369d4e4d770f0cd1cb1d396b3dc3364cfc | |
parent | 22ba7380e8da6217fae038493dec7d049a347cbf (diff) | |
parent | a54d30dd215695d6414332081c1f8076720595fb (diff) |
Merge pull request #25014 from vespa-engine/bratseth/illegal-argument
Don't lose illegal argument classification
-rw-r--r-- | config-model/src/main/java/com/yahoo/schema/derived/RankProfileList.java | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/config-model/src/main/java/com/yahoo/schema/derived/RankProfileList.java b/config-model/src/main/java/com/yahoo/schema/derived/RankProfileList.java index 27e6d6e57a6..c254385a96e 100644 --- a/config-model/src/main/java/com/yahoo/schema/derived/RankProfileList.java +++ b/config-model/src/main/java/com/yahoo/schema/derived/RankProfileList.java @@ -123,9 +123,13 @@ public class RankProfileList extends Derived implements RankProfilesConfig.Produ rawRankProfiles.put(rawRank.getName(), rawRank); } return rawRankProfiles; - } catch (InterruptedException | ExecutionException e) { + } catch (InterruptedException e) { throw new IllegalStateException(e); } + catch (ExecutionException e) { + throw e.getCause() instanceof IllegalArgumentException ? (IllegalArgumentException)e.getCause() + : new IllegalStateException(e); + } } private static FileDistributedConstants deriveFileDistributedConstants(Schema schema, |