changeset 1168:ace192d3283d

Add an error message to the calculation report if an error occured while WSPLGENJob creation. flys-artifacts/trunk@2714 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Tue, 13 Sep 2011 07:47:56 +0000
parents f1c9bfb07ba7
children 0dc274b5f4ba
files flys-artifacts/ChangeLog flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/FloodMapState.java flys-artifacts/src/main/resources/messages.properties flys-artifacts/src/main/resources/messages_de.properties flys-artifacts/src/main/resources/messages_de_DE.properties flys-artifacts/src/main/resources/messages_en.properties
diffstat 6 files changed, 27 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/flys-artifacts/ChangeLog	Tue Sep 13 06:30:10 2011 +0000
+++ b/flys-artifacts/ChangeLog	Tue Sep 13 07:47:56 2011 +0000
@@ -1,3 +1,15 @@
+2011-09-13  Ingo Weinzierl <ingo@intevation.de>
+
+	* src/main/java/de/intevation/flys/artifacts/states/FloodMapState.java:
+	  Add an quick and simple error to the report if an error occured while
+	  WSPLGENJob creation.
+
+	* src/main/resources/messages.properties,
+	  src/main/resources/messages_de_DE.properties,
+	  src/main/resources/messages_en.properties,
+	  src/main/resources/messages_de.properties: Added error messages for
+	  WSPLGEN job creation errors.
+
 2011-09-13  Felix Wolfsteller <felix.wolfsteller@intevation.de>
 
  Fix crash when drawing StickyAxisAnnotation when no range was given.
@@ -40,7 +52,6 @@
 	  calculation has been added to the scheduler AND if there are digitized
 	  geometries existing.
 
->>>>>>> .r2711
 2011-09-12  Felix Wolfsteller <felix.wolfsteller@intevation.de>
 
  Copied and slightly modified implementation of guessWaterIncreasing from
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/FloodMapState.java	Tue Sep 13 06:30:10 2011 +0000
+++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/FloodMapState.java	Tue Sep 13 07:47:56 2011 +0000
@@ -189,11 +189,22 @@
             context,
             calculation);
 
+        CalculationResult  res   = new CalculationResult(null, calculation);
+        WSPLGENReportFacet report= new WSPLGENReportFacet(
+            ComputeType.ADVANCE, hash, getID(), res);
+
+        facets.add(report);
+
         if (job == null) {
             if (KEEP_ARTIFACT_DIR.equals("false")) {
                 removeDirectory(artifact);
             }
 
+            calculation.addError(-1, Resources.getMsg(
+                context.getMeta(),
+                "wsplgen.job.error",
+                "wsplgen.job.error"));
+
             logger.error("No WSPLGEN processing has been started!");
 
             return null;
@@ -204,11 +215,6 @@
 
         facetCreator.createWSPLGENFacet();
 
-        CalculationResult  res   = new CalculationResult(null, calculation);
-        WSPLGENReportFacet report= new WSPLGENReportFacet(
-            ComputeType.ADVANCE, hash, getID(), res);
-
-        facets.add(report);
         facets.addAll(facetCreator.getFacets());
 
         context.afterCall(CallContext.BACKGROUND);
--- a/flys-artifacts/src/main/resources/messages.properties	Tue Sep 13 06:30:10 2011 +0000
+++ b/flys-artifacts/src/main/resources/messages.properties	Tue Sep 13 07:47:56 2011 +0000
@@ -77,3 +77,4 @@
 floodmap.riveraxis = River Axis
 
 wsplgen.job.queued = WSPLGEN job in queue.
+wsplgen.job.error = An unexpected error while starting WSPLGEN occured.
--- a/flys-artifacts/src/main/resources/messages_de.properties	Tue Sep 13 06:30:10 2011 +0000
+++ b/flys-artifacts/src/main/resources/messages_de.properties	Tue Sep 13 07:47:56 2011 +0000
@@ -78,3 +78,4 @@
 floodmap.riveraxis = Flussachse
 
 wsplgen.job.queued = WSPLGEN Berechnung befindet sich in Warteschlange.
+wsplgen.job.error = Ein unerwarteter Fehler beim Starten von WSPLGEN ist aufgetreten.
--- a/flys-artifacts/src/main/resources/messages_de_DE.properties	Tue Sep 13 06:30:10 2011 +0000
+++ b/flys-artifacts/src/main/resources/messages_de_DE.properties	Tue Sep 13 07:47:56 2011 +0000
@@ -77,3 +77,4 @@
 floodmap.riveraxis = Flussachse
 
 wsplgen.job.queued = WSPLGEN Berechnung befindet sich in Warteschlange.
+wsplgen.job.error = Ein unerwarteter Fehler beim Starten von WSPLGEN ist aufgetreten.
--- a/flys-artifacts/src/main/resources/messages_en.properties	Tue Sep 13 06:30:10 2011 +0000
+++ b/flys-artifacts/src/main/resources/messages_en.properties	Tue Sep 13 07:47:56 2011 +0000
@@ -75,3 +75,4 @@
 floodmap.riveraxis = River Axis
 
 wsplgen.job.queued = WSPLGEN job in queue.
+wsplgen.job.error = An unexpected error while starting WSPLGEN occured.

http://dive4elements.wald.intevation.org