merge of localization branch into HEAD. mh and zap
[mir.git] / source / mir / misc / MirConfig.java
index a64f4cf..a3e9199 100755 (executable)
@@ -73,7 +73,14 @@ public class MirConfig extends Configuration {
    * @return a String containing the prop. value
    */
   public static String getProp(String propName) {
-    return (String)configHash.get(propName);
+    String result = (String)configHash.get(propName);
+
+    if (result==null)
+      throw new ConfigException("config property '"+propName+"' not available!");
+
+
+
+    return result;
   }
 
   /**
@@ -83,12 +90,11 @@ public class MirConfig extends Configuration {
    * @return a String containing the prop.value
    */
   public static String getPropWithHome(String propName) {
-    return (String)configHash.get("Home") +
-           (String)configHash.get(propName);
+    return getProp("Home") + getProp(propName);
   }
 
   /**
-   * Returns the property asked for iin raw Object form by 
+   * Returns the property asked for iin raw Object form by
    * pulling it out a HashMap
    * @param a String containing the property name (key)
    * @return an Object containing the prop.value