From 10c217c9706d98f481da587e1e64d823d58b6393 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Brunner?= Date: Thu, 19 Nov 2020 16:50:07 +0100 Subject: [PATCH] Add some error message --- .../print/servlet/ServletMapPrinterFactory.java | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/core/src/main/java/org/mapfish/print/servlet/ServletMapPrinterFactory.java b/core/src/main/java/org/mapfish/print/servlet/ServletMapPrinterFactory.java index 92f328af92..5667d3511c 100644 --- a/core/src/main/java/org/mapfish/print/servlet/ServletMapPrinterFactory.java +++ b/core/src/main/java/org/mapfish/print/servlet/ServletMapPrinterFactory.java @@ -73,6 +73,12 @@ public final synchronized MapPrinter create(@Nullable final String app) throws N } if (configFile == null) { + LOGGER.error( + "There is no configurationFile registered in the {}" + + " bean with the id: '{}' from configurationFiles:\n {}", + getClass().getName(), finalApp, + String.join("\n", this.configurationFiles.keySet()) + ); throw new NoSuchAppException( "There is no configurationFile registered in the " + getClass().getName() + " bean with the id: '" + finalApp + "'"); @@ -86,7 +92,10 @@ public final synchronized MapPrinter create(@Nullable final String app) throws N try { configFileLastModified = this.configFileLoader.lastModified(configFile); } catch (NoSuchElementException e) { - // the app has been removed + LOGGER.error( + "There is no configurationFile registered in the {}" + + " bean with the id: '{}'", getClass().getName(), finalApp); + // The app has been removed this.configurationFiles.remove(finalApp); this.configurationFileLastModifiedTimes.remove(finalApp); this.printers.remove(finalApp);