Avoids npe when no config file path
[mkjsf-moved-to-github.git] / src / main / java / com / indexdata / pz2utils4jsf / config / Pz2Config.java
index b182777..0c9fc6f 100644 (file)
@@ -82,12 +82,12 @@ public class Pz2Config implements ModuleConfigurationGetter, Serializable {
     if (properties.containsKey(key)) {\r
       return properties.get(key);\r
     } \r
-    throw new Error("Missing mandatory parameter: " + key);     \r
+    throw new MissingMandatoryParameterException("Missing mandatory parameter: " + key);     \r
   }\r
 \r
   @Override\r
   public String getConfigFilePath() {\r
-    return moduleConfig.getConfigFilePath();\r
+    return (moduleConfig != null ? moduleConfig.getConfigFilePath() : "nopath");\r
   }\r
   \r
   \r