From 54e258f41a2d9588ff2bf818c5a87b522c36b739 Mon Sep 17 00:00:00 2001 From: jensp Date: Thu, 7 Jun 2012 16:59:16 +0000 Subject: [PATCH] Verbesserung der Fehlermeldung wenn die Datei mit dem Verzeichnis der Templates nicht gefunden werden kann. git-svn-id: https://svn.libreccm.org/ccm/trunk@1694 8810af33-2d31-482b-a856-94f89814c4df --- ccm-navigation/src/com/arsdigita/navigation/Loader.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ccm-navigation/src/com/arsdigita/navigation/Loader.java b/ccm-navigation/src/com/arsdigita/navigation/Loader.java index 99a8b008b..14617e953 100755 --- a/ccm-navigation/src/com/arsdigita/navigation/Loader.java +++ b/ccm-navigation/src/com/arsdigita/navigation/Loader.java @@ -182,6 +182,9 @@ public class Loader extends PackageLoader { String templatesFile = (String)get(m_templatesFile); InputStream file = Thread.currentThread().getContextClassLoader() .getResourceAsStream(templatesFile); + if (file == null) { + throw new UncheckedWrapperException(String.format("Failed to open templates files %s.", templatesFile)); + } BufferedReader templates = new BufferedReader( new InputStreamReader( file ) );