comparison flys-artifacts/src/main/java/de/intevation/flys/artifacts/GaugeDischargeArtifact.java @ 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 afc7bfb4800b
children a2735a4bf75e
comparison
equal deleted inserted replaced
3590:4f2470cbf72c 3591:7500c7fbfaa9
168 168
169 String name = getGaugeName(); 169 String name = getGaugeName();
170 double [][] values = map.get(name); 170 double [][] values = map.get(name);
171 if (values == null) { 171 if (values == null) {
172 logger.error("No values for this gauge / discharge found."); 172 logger.error("No values for this gauge / discharge found.");
173 return error(new WQKms[0], "no.gauge.found");
173 } 174 }
174 for (int i = 0 ; i < values[0].length; i++) { 175 for (int i = 0 ; i < values[0].length; i++) {
175 values[0][i] += gauge.getDatum().doubleValue(); 176 values[0][i] += gauge.getDatum().doubleValue();
176 } 177 }
177 double [] kms = new double[values[0].length]; 178 double [] kms = new double[values[0].length];

http://dive4elements.wald.intevation.org