Mercurial > mxd2map
comparison src/java/de/intevation/mxd/reader/MarkerLineSymbolReader.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 |
---|---|
54 /** | 54 /** |
55 * Reads the symbol attributes. | 55 * Reads the symbol attributes. |
56 * | 56 * |
57 * @return The XML node. | 57 * @return The XML node. |
58 */ | 58 */ |
59 public Element read() | 59 public Element read() { |
60 throws Exception { | |
61 logger.debug("read()"); | 60 logger.debug("read()"); |
62 IMarkerSymbol sym = symbol.getMarkerSymbol(); | 61 try { |
63 if(sym instanceof MultiLayerMarkerSymbol) { | 62 IMarkerSymbol sym = symbol.getMarkerSymbol(); |
64 ISymbolReader sreader = new MultiLayerMarkerSymbolReader(sym); | 63 if(sym instanceof MultiLayerMarkerSymbol) { |
65 sreader.setParent(parent); | 64 ISymbolReader sreader = new MultiLayerMarkerSymbolReader(sym); |
66 sreader.setUtil(util); | 65 sreader.setParent(parent); |
67 sreader.read(); | 66 sreader.setUtil(util); |
67 sreader.read(); | |
68 } | |
69 else { | |
70 logger.debug("The type of " + sym.getClass().toString() + | |
71 " is not implemented!"); | |
72 } | |
68 } | 73 } |
69 else { | 74 catch(Exception e) { |
70 logger.debug("The type of " + sym.getClass().toString() + | 75 logger.error( |
71 " is not implemented!"); | 76 "Could not read the symbol " + |
77 symbol.getClass().toString()); | |
72 } | 78 } |
73 return parent; | 79 return parent; |
74 } | 80 } |
75 } | 81 } |
76 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : | 82 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : |