comparison src/java/de/intevation/mxd/reader/MultiLayerFillSymbolReader.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
comparison
equal deleted inserted replaced
114:93699e8f2d1f 115:fb93f20478cc
53 /** 53 /**
54 * Reads the symbol attributes. 54 * Reads the symbol attributes.
55 * 55 *
56 * @return The XML node. 56 * @return The XML node.
57 */ 57 */
58 public Element read() 58 public Element read() {
59 throws Exception {
60 logger.debug("read()"); 59 logger.debug("read()");
61 for(int i = 0; i < symbol.getLayerCount(); i++) { 60 try {
62 ISymbol sym = (ISymbol)symbol.getLayer(i); 61 for(int i = 0; i < symbol.getLayerCount(); i++) {
62 ISymbol sym = (ISymbol)symbol.getLayer(i);
63 63
64 FillSymbolReader fsr = new FillSymbolReader(); 64 FillSymbolReader fsr = new FillSymbolReader();
65 if(fsr.canRead(sym)) { 65 if(fsr.canRead(sym)) {
66 fsr.setSymbol(sym); 66 fsr.setSymbol(sym);
67 fsr.setParent(parent); 67 fsr.setParent(parent);
68 fsr.setUtil(util); 68 fsr.setUtil(util);
69 fsr.read(); 69 fsr.read();
70 }
71 else {
72 logger.debug("The type of " + sym.getClass().toString() +
73 " is not implemented!");
74 }
70 } 75 }
71 else { 76 }
72 logger.debug("The type of " + sym.getClass().toString() + 77 catch(Exception e) {
73 " is not implemented!"); 78 logger.error(
74 } 79 "Could not read the symbol " +
80 symbol.getClass().toString());
75 } 81 }
76 return parent; 82 return parent;
77 } 83 }
78 } 84 }
79 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : 85 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)