changeset 9198:810f47bba83e

Compile errors fixed
author gernotbelger
date Fri, 29 Jun 2018 16:14:18 +0200
parents fb5272746c74
children d177121fc95d
files artifacts/src/main/java/org/dive4elements/river/artifacts/uinfo/inundationduration/UedauernPropertiesHelper.java
diffstat 1 files changed, 15 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/uinfo/inundationduration/UedauernPropertiesHelper.java	Fri Jun 29 15:11:22 2018 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/uinfo/inundationduration/UedauernPropertiesHelper.java	Fri Jun 29 16:14:18 2018 +0200
@@ -9,6 +9,7 @@
  */
 package org.dive4elements.river.artifacts.uinfo.inundationduration;
 
+import java.io.IOException;
 import java.util.HashMap;
 import java.util.LinkedHashMap;
 import java.util.Map;
@@ -69,7 +70,12 @@
 
     private Properties getProperties() {
         if (this.properties == null) {
-            this.properties = Config.loadProperties(this.CONFIG_FILE);
+            try {
+                this.properties = Config.loadProperties(this.CONFIG_FILE);
+            }
+            catch (final IOException e) {
+                e.printStackTrace();
+            }
         }
         return this.properties;
     }
@@ -112,8 +118,14 @@
     }
 
     public static boolean fileExistsForRiver(final String river) {
-        Config.loadProperties(makeFileName(river));
-        return true;
+        try {
+            Config.loadProperties(makeFileName(river));
+            return true;
+        }
+        catch (final IOException e) {
+            e.printStackTrace();
+            return false;
+        }
     }
 
     public String getScenarioUrlFromYear(final Integer year, final Integer dMwspl) {

http://dive4elements.wald.intevation.org