From da093d45b59b554a93cca5007f2df29452222e75 Mon Sep 17 00:00:00 2001 From: jan-vcapgemini Date: Thu, 10 Aug 2023 12:36:36 +0200 Subject: [PATCH] #1696: added missing exception added exception when template set is empty --- .../cobigen/impl/config/reader/TemplateSetsConfigReader.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cobigen/cobigen-core/src/main/java/com/devonfw/cobigen/impl/config/reader/TemplateSetsConfigReader.java b/cobigen/cobigen-core/src/main/java/com/devonfw/cobigen/impl/config/reader/TemplateSetsConfigReader.java index bbfd7ff58..557cd07af 100644 --- a/cobigen/cobigen-core/src/main/java/com/devonfw/cobigen/impl/config/reader/TemplateSetsConfigReader.java +++ b/cobigen/cobigen-core/src/main/java/com/devonfw/cobigen/impl/config/reader/TemplateSetsConfigReader.java @@ -64,6 +64,10 @@ private void readTemplateSets(Path configRoot) { @Override public ContextConfiguration readContextConfiguration() { + if (templateSets.isEmpty()) { + throw new InvalidConfigurationException(configRoot, + "Could not find any template-set configuration file in the given folder."); + } return templateSets.values().parallelStream().map(ts -> { TemplateSetReader tsReader; synchronized (templateSetReaderCache) {