# HG changeset patch # User Ingo Weinzierl # Date 1315900076 0 # Node ID ace192d3283ddacfbd15ebc255a92135f5fb3ac5 # Parent f1c9bfb07ba721908d7b6790ed998d97fca31cd3 Add an error message to the calculation report if an error occured while WSPLGENJob creation. flys-artifacts/trunk@2714 c6561f87-3c4e-4783-a992-168aeb5c3f6f diff -r f1c9bfb07ba7 -r ace192d3283d flys-artifacts/ChangeLog --- 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 + + * 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 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 Copied and slightly modified implementation of guessWaterIncreasing from diff -r f1c9bfb07ba7 -r ace192d3283d flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/FloodMapState.java --- 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); diff -r f1c9bfb07ba7 -r ace192d3283d flys-artifacts/src/main/resources/messages.properties --- 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. diff -r f1c9bfb07ba7 -r ace192d3283d flys-artifacts/src/main/resources/messages_de.properties --- 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. diff -r f1c9bfb07ba7 -r ace192d3283d flys-artifacts/src/main/resources/messages_de_DE.properties --- 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. diff -r f1c9bfb07ba7 -r ace192d3283d flys-artifacts/src/main/resources/messages_en.properties --- 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.