[Dive4elements-commits] [PATCH] Bed height single import: give more informative warnings

Wald Commits scm-commit at wald.intevation.org
Mon Mar 25 11:53:00 CET 2013


# HG changeset patch
# User Tom Gottfried <tom.gottfried at intevation.de>
# Date 1364208764 -3600
# Node ID 4319b1289592e6c11c00a28663a6e87ef617db57
# Parent  95050a944d81646359fdcc2ec75b4eea15b902eb
Bed height single import: give more informative warnings

diff -r 95050a944d81 -r 4319b1289592 flys-backend/src/main/java/de/intevation/flys/importer/ImportBedHeightSingle.java
--- a/flys-backend/src/main/java/de/intevation/flys/importer/ImportBedHeightSingle.java	Mon Mar 25 10:22:48 2013 +0100
+++ b/flys-backend/src/main/java/de/intevation/flys/importer/ImportBedHeightSingle.java	Mon Mar 25 11:52:44 2013 +0100
@@ -140,8 +140,21 @@
             ElevationModel theCurModel = curElevationModel.getPeer();
             Range          theRange    = range != null ? range.getPeer(river) : null;
 
-            if (theType == null || theCurModel == null || theRange == null) {
-                log.warn("BHS: Skip invalid file '" + description + "'");
+            if (theType == null) {
+                log.warn("BHS: No bed height type given. Skip file '" + 
+			 description + "'");
+                return null;
+            }
+
+            if (theCurModel == null) {
+                log.warn("BHS: No elevation model given. Skip file '" + 
+			 description + "'");
+                return null;
+            }
+
+            if (theRange == null) {
+                log.warn("BHS: No km-range given. Skip file '" + 
+			 description + "'");
                 return null;
             }
 


More information about the Dive4elements-commits mailing list