Mercurial > mxd2map
diff 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 |
line wrap: on
line diff
--- a/src/java/de/intevation/mxd/reader/MarkerLineSymbolReader.java Wed Jun 15 16:13:32 2011 +0200 +++ b/src/java/de/intevation/mxd/reader/MarkerLineSymbolReader.java Wed Jun 15 16:48:42 2011 +0200 @@ -56,19 +56,25 @@ * * @return The XML node. */ - public Element read() - throws Exception { + public Element read() { logger.debug("read()"); - IMarkerSymbol sym = symbol.getMarkerSymbol(); - if(sym instanceof MultiLayerMarkerSymbol) { - ISymbolReader sreader = new MultiLayerMarkerSymbolReader(sym); - sreader.setParent(parent); - sreader.setUtil(util); - sreader.read(); + try { + IMarkerSymbol sym = symbol.getMarkerSymbol(); + if(sym instanceof MultiLayerMarkerSymbol) { + ISymbolReader sreader = new MultiLayerMarkerSymbolReader(sym); + sreader.setParent(parent); + sreader.setUtil(util); + sreader.read(); + } + else { + logger.debug("The type of " + sym.getClass().toString() + + " is not implemented!"); + } } - else { - logger.debug("The type of " + sym.getClass().toString() + - " is not implemented!"); + catch(Exception e) { + logger.error( + "Could not read the symbol " + + symbol.getClass().toString()); } return parent; }