[PATCH] Throw non-lethal XPathException if not at gauge instead of lethal PSQLException if at gauge
Wald Commits
scm-commit at wald.intevation.org
Fri Sep 26 14:19:08 CEST 2014
# HG changeset patch
# User "Tom Gottfried <tom at intevation.de>"
# Date 1411733907 -7200
# Node ID 9d62a8b4bf1573865ed1114ad1bcffa1da4958b2
# Parent 38f57e854977e1422e098d9a94a3bf44283ce2d8
Throw non-lethal XPathException if not at gauge instead of lethal PSQLException if at gauge.
diff -r 38f57e854977 -r 9d62a8b4bf15 artifacts/doc/conf/meta-data.xml
--- a/artifacts/doc/conf/meta-data.xml Fri Sep 26 10:53:26 2014 +0200
+++ b/artifacts/doc/conf/meta-data.xml Fri Sep 26 14:18:27 2014 +0200
@@ -466,6 +466,8 @@
<dc:macro name="historical_discharge_curve">
+ <dc:variable name="refgauge" type="number"
+ expr="dc:get('reference_gauge')"/>
<dc:context>
<dc:statement>
SELECT g.id AS gauge_id,
@@ -480,7 +482,7 @@
WHERE g.river_id = ${river_id}
AND dt.kind <> 0
AND ((g.station = ${fromkm} AND g.station = ${tokm})
- OR g.official_number = ${reference_gauge})
+ OR g.official_number = ${refgauge})
ORDER BY start_time
</dc:statement>
<dc:if test="dc:has-result()">
@@ -1783,6 +1785,8 @@
</dc:macro>
<dc:macro name="discharge_table_gauge">
+ <dc:variable name="refgauge" type="number"
+ expr="dc:get('reference_gauge')"/>
<dc:context>
<dc:statement>
SELECT g.id AS gauge_id,
@@ -1795,7 +1799,7 @@
WHERE g.river_id = ${river_id}
AND dt.kind = 0
AND ((g.station = ${fromkm} AND g.station = ${tokm})
- OR g.official_number = ${reference_gauge})
+ OR g.official_number = ${refgauge})
</dc:statement>
<dc:if test="dc:has-result()">
<dc:for-each>
More information about the Dive4Elements-commits
mailing list