[MXD2map-commits] r255:5c80058c08f6

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Mon Aug 15 14:15:06 CEST 2011


details:   http://hg.intevation.org/geospatial/mxd2map/rev/5c80058c08f6

changeset: 255:5c80058c08f6

user:      raimund renkert <raimund.renkert at intevation.de>

date:      Mon Aug 15 14:12:19 2011 +0200

description:
Replaced error outputs with logging messages.


diffstat:

 ChangeLog                                 |   5 +++++
 src/java/de/intevation/mxd/Converter.java |  21 ++++++++++++++++-----
 2 files changed, 21 insertions(+), 5 deletions(-)

diffs (64 lines):

diff -r 8e5d67c45b64 -r 5c80058c08f6 ChangeLog
--- a/ChangeLog	Mon Aug 15 13:39:42 2011 +0200
+++ b/ChangeLog	Mon Aug 15 14:12:19 2011 +0200
@@ -1,3 +1,8 @@
+2011-08-15  Raimund Renkert  <raimund.renkert at intevation.de>
+
+	* src/java/de/intevation/mxd/Converter.java:
+	  Replaced error outputs with logging messages.
+
 2011-08-15  Raimund Renkert  <raimund.renkert at intevation.de>
 
 	* src/java/de/intevation/mxd/writer/SymbolWriter.java:
diff -r 8e5d67c45b64 -r 5c80058c08f6 src/java/de/intevation/mxd/Converter.java
--- a/src/java/de/intevation/mxd/Converter.java	Mon Aug 15 13:39:42 2011 +0200
+++ b/src/java/de/intevation/mxd/Converter.java	Mon Aug 15 14:12:19 2011 +0200
@@ -100,7 +100,10 @@
                     mxdfile = readProperty("mxd");
                 }
                 catch(Exception e) {
-                    e.printStackTrace ();
+                    logger.warn(
+                        "No property file found. " + 
+                        "Please provide a valid property file or append " +
+                        "parameters for mxd file, map file and template.");
                 }
             }
             if(mapfile == null) {
@@ -108,7 +111,10 @@
                     mapfile = readProperty("map");
                 }
                 catch(Exception e) {
-                    e.printStackTrace ();
+                    logger.warn(
+                        "No property file found. " + 
+                        "Please provide a valid property file or append " +
+                        "parameters for mxd file, map file and template.");
                 }
             }
             if(maptemplate == null) {
@@ -116,7 +122,10 @@
                     maptemplate = readProperty("map-template");
                 }
                 catch(Exception e) {
-                    e.printStackTrace ();
+                    logger.warn(
+                        "No property file found. " + 
+                        "Please provide a valid property file or append " +
+                        "parameters for mxd file, map file and template.");
                 }
             }
 
@@ -131,8 +140,10 @@
             reader.shutdown();
         }
         catch(Exception e) {
-            logger.error(e.getMessage());
-            e.printStackTrace();
+            logger.debug(e.getMessage());
+            logger.error(
+                "General error." +
+                " See logging file for more information.");
         }
     }
 


More information about the MXD2map-commits mailing list