[PATCH] On error log error

Wald Commits scm-commit at wald.intevation.org
Thu Dec 18 16:12:20 CET 2014


# HG changeset patch
# User "Tom Gottfried <tom at intevation.de>"
# Date 1418915521 -3600
# Node ID 2dba91c00c72702f8c802cdd0b737471bc4c4650
# Parent  288ea098494c55a5695eb3d15d549381d56893fd
On error log error.

diff -r 288ea098494c -r 2dba91c00c72 artifacts/src/main/java/org/dive4elements/river/wsplgen/WSPLGENCallable.java
--- a/artifacts/src/main/java/org/dive4elements/river/wsplgen/WSPLGENCallable.java	Thu Dec 18 15:45:17 2014 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/wsplgen/WSPLGENCallable.java	Thu Dec 18 16:12:01 2014 +0100
@@ -94,7 +94,13 @@
                 }
                 catch (InterruptedException iee) { /* do nothing */ }
 
-                log.info("WSPLGEN exit value: " + process.exitValue());
+                int exitValue = process.exitValue();
+                if (exitValue < 2) {
+                    log.info("WSPLGEN exit value: " + exitValue);
+                }
+                else {
+                    log.error("WSPLGEN exit value: " + exitValue);
+                }
                 log.info(
                     "WSPLGEN throw " +
                     errorObserver.numErrors() + " errors.");
@@ -102,7 +108,7 @@
                     "WSPLGEN throw " +
                     errorObserver.numWarnings() + " warnings.");
 
-                if (process.exitValue() < 2 && errorObserver.numErrors() == 0) {
+                if (exitValue < 2 && errorObserver.numErrors() == 0) {
                     FacetCreator fc = job.getFacetCreator();
                     fc.createWSPLGENFacet();
                     fc.finish();


More information about the Dive4Elements-commits mailing list