diff src/java/de/intevation/mxd/reader/MultiLayerLineSymbolReader.java @ 115:fb93f20478cc

Improved exception handling for symbol reader.
author Raimund Renkert <rrenkert@intevation.de>
date Wed, 15 Jun 2011 16:48:42 +0200
parents 59e06c405a9a
children 0bde090506f9
line wrap: on
line diff
--- a/src/java/de/intevation/mxd/reader/MultiLayerLineSymbolReader.java	Wed Jun 15 16:13:32 2011 +0200
+++ b/src/java/de/intevation/mxd/reader/MultiLayerLineSymbolReader.java	Wed Jun 15 16:48:42 2011 +0200
@@ -54,15 +54,21 @@
      *
      * @return The XML node.
      */
-    public Element read()
-    throws Exception {
+    public Element read() {
         logger.debug("read()");
-        for(int i = 0; i < symbol.getLayerCount(); i++) {
-            ISymbol sym = (ISymbol)symbol.getLayer(i);
-            ISymbolReader sreader = new LineSymbolReader(sym);
-            sreader.setParent(parent);
-            sreader.setUtil(util);
-            sreader.read();
+        try {
+            for(int i = 0; i < symbol.getLayerCount(); i++) {
+                ISymbol sym = (ISymbol)symbol.getLayer(i);
+                ISymbolReader sreader = new LineSymbolReader(sym);
+                sreader.setParent(parent);
+                sreader.setUtil(util);
+                sreader.read();
+            }
+        }
+        catch(Exception e) {
+            logger.error(
+                "Could not read the symbol " +
+                symbol.getClass().toString());
         }
         return parent;
     }
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)