changeset 3591:7500c7fbfaa9

Fail more gracefully. flys-artifacts/trunk@5212 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Felix Wolfsteller <felix.wolfsteller@intevation.de>
date Wed, 15 Aug 2012 14:40:11 +0000
parents 4f2470cbf72c
children da60327f6d7c
files flys-artifacts/ChangeLog flys-artifacts/src/main/java/de/intevation/flys/artifacts/GaugeDischargeArtifact.java
diffstat 2 files changed, 6 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/flys-artifacts/ChangeLog	Wed Aug 15 07:55:50 2012 +0000
+++ b/flys-artifacts/ChangeLog	Wed Aug 15 14:40:11 2012 +0000
@@ -1,3 +1,8 @@
+2012-08-15	Felix Wolfsteller	<felix.wolfsteller@intevation.de>
+
+	* src/main/java/de/intevation/flys/artifacts/GaugeDischargeArtifact.java:
+	  Fail more gracefully.
+
 2012-08-14	Felix Wolfsteller	<felix.wolfsteller@intevation.de>
 
 	* doc/conf/meta-data.xml: More former calculations in fixA (dwt) DC.
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/GaugeDischargeArtifact.java	Wed Aug 15 07:55:50 2012 +0000
+++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/GaugeDischargeArtifact.java	Wed Aug 15 14:40:11 2012 +0000
@@ -170,6 +170,7 @@
         double [][] values = map.get(name);
         if (values == null) {
             logger.error("No values for this gauge / discharge found.");
+            return error(new WQKms[0], "no.gauge.found");
         }
         for (int i = 0 ; i < values[0].length; i++) {
             values[0][i] += gauge.getDatum().doubleValue();

http://dive4elements.wald.intevation.org