diff flys-aft/src/main/java/de/intevation/aft/Sync.java @ 4110:06891562e633

Extracted and documented the error messages of the process. flys-aft/trunk@4054 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Thu, 16 Feb 2012 11:26:56 +0000
parents cdcf98245e36
children f939e1e6cfa4
line wrap: on
line diff
--- a/flys-aft/src/main/java/de/intevation/aft/Sync.java	Wed Feb 08 09:43:12 2012 +0000
+++ b/flys-aft/src/main/java/de/intevation/aft/Sync.java	Thu Feb 16 11:26:56 2012 +0000
@@ -52,7 +52,7 @@
                 url = new URL(urlString);
             }
             catch (MalformedURLException mfue) {
-                log.warn("Invalid URL '" + urlString + "'. Ignored.", mfue);
+                log.warn("NOTIFY: Invalid URL '" + urlString + "'. Ignored.", mfue);
                 continue;
             }
 
@@ -94,14 +94,14 @@
         File dipsFile = new File(dipsF);
 
         if (!dipsFile.isFile() || !dipsFile.canRead()) {
-            log.error("Cannot find '" + dipsF + "'");
+            log.error("DIPS: Cannot find '" + dipsF + "'.");
             System.exit(1);
         }
 
         Document dips = XML.parseDocument(dipsFile, Boolean.FALSE);
 
         if (dips == null) {
-            log.error("Cannot load DIPS document.");
+            log.error("DIPS: Cannot load DIPS document.");
             System.exit(1);
         }
 
@@ -111,12 +111,12 @@
         if (repairF != null && repairF.length() > 0) {
             File repairFile = new File(repairF);
             if (!repairFile.isFile() || !repairFile.canRead()) {
-                log.warn("Cannot open DIPS repair XSLT file.");
+                log.warn("REPAIR: Cannot open DIPS repair XSLT file.");
             }
             else {
                 Document fixed = XML.transform(dips, repairFile);
                 if (fixed == null) {
-                    log.warn("Fixing DIPS failed");
+                    log.warn("REPAIR: Fixing DIPS failed.");
                 }
                 else {
                     dips = fixed;
@@ -145,7 +145,7 @@
             modified = rivers.sync(syncContext);
         }
         catch (SQLException sqle) {
-            log.error("syncing failed", sqle);
+            log.error("SYNC: Syncing failed.", sqle);
             exitCode = 1;
         }
         finally {

http://dive4elements.wald.intevation.org