changeset 1860:ddd425858169

Improved logging to include exception in fail case of spline interpolation of wst. flys-artifacts/trunk@3209 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Felix Wolfsteller <felix.wolfsteller@intevation.de>
date Thu, 10 Nov 2011 10:13:57 +0000
parents 755d9763928f
children 11c4b1429117
files flys-artifacts/ChangeLog flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/WstValueTable.java
diffstat 2 files changed, 10 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/flys-artifacts/ChangeLog	Thu Nov 10 10:12:25 2011 +0000
+++ b/flys-artifacts/ChangeLog	Thu Nov 10 10:13:57 2011 +0000
@@ -1,3 +1,8 @@
+2011-11-10  Felix Wolfsteller <felix.wolfsteller@intevation.de>
+
+	* src/main/java/de/intevation/flys/artifacts/model/WstValueTable.java:
+	  Include exception when logging issue with spline creation.
+
 2011-11-10  Felix Wolfsteller <felix.wolfsteller@intevation.de>
 
 	* src/main/java/de/intevation/flys/artifacts/datacage/templating/Builder.java:
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/WstValueTable.java	Thu Nov 10 10:12:25 2011 +0000
+++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/WstValueTable.java	Thu Nov 10 10:13:57 2011 +0000
@@ -217,7 +217,7 @@
                     // TODO: I18N
                     errors.addProblem(km, "spline creation failed");
                 }
-                log.error("spline creation failed");
+                log.error("spline creation failed", miae);
                 return new double[2][0];
             }
 
@@ -295,7 +295,7 @@
                     // TODO: I18N
                     errors.addProblem(km, "spline creation failed");
                 }
-                log.error("spline creation failed");
+                log.error("spline creation failed", miae);
                 return new double[2][0];
             }
 
@@ -456,6 +456,9 @@
         return interpolateWQ(km, DEFAULT_Q_STEPS, errors);
     }
 
+    /**
+     * Interpolate W and Q values at a given km.
+     */
     public double [][] interpolateWQ(double km, int steps, Calculation errors) {
 
         int rowIndex = Collections.binarySearch(rows, new Row(km));
@@ -667,6 +670,5 @@
         double q2 = columns[index  ].getQRangeTree().findQ(km);
         return Linear.weight(weight, q1, q2);
     }
-
 }
 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :

http://dive4elements.wald.intevation.org