Mercurial > mxd2map
diff src/java/de/intevation/mxd/reader/SimpleFillSymbolReader.java @ 74:7eba97e8201b
Catch all exceptions in the MXDReader.
author | Raimund Renkert <rrenkert@intevation.de> |
---|---|
date | Thu, 26 May 2011 18:11:29 +0200 |
parents | 2cbe423b1fda |
children | 83932f18dddc |
line wrap: on
line diff
--- a/src/java/de/intevation/mxd/reader/SimpleFillSymbolReader.java Thu May 26 17:29:09 2011 +0200 +++ b/src/java/de/intevation/mxd/reader/SimpleFillSymbolReader.java Thu May 26 18:11:29 2011 +0200 @@ -84,16 +84,9 @@ * @return The XML node. */ public Element read() - throws IOException { + throws Exception { logger.debug("read()"); - Element symbolElement; - try { - symbolElement = util.addSymbol(renderer); - } - catch(Exception e) { - e.printStackTrace(); - return null; - } + Element symbolElement = util.addSymbol(renderer); symbolElement.setAttribute("name", symbol.getNameString()); symbolElement.setAttribute("style", "fill"); @@ -139,22 +132,17 @@ String.valueOf(col.getTransparency())); } - try { - ILineSymbol ls = symbol.getOutline(); - LineSymbolReader lsr = new LineSymbolReader(); - if(lsr.canRead(ls)) { - lsr.setSymbol(ls); - lsr.setUtil(util); - lsr.setParent(symbolElement); - lsr.read(); - } - else { - logger.debug("The type of " + ls.getClass().toString() + - " is not implemented!"); - } + ILineSymbol ls = symbol.getOutline(); + LineSymbolReader lsr = new LineSymbolReader(); + if(lsr.canRead(ls)) { + lsr.setSymbol(ls); + lsr.setUtil(util); + lsr.setParent(symbolElement); + lsr.read(); } - catch(Exception e) { - e.printStackTrace(); + else { + logger.debug("The type of " + ls.getClass().toString() + + " is not implemented!"); } return symbolElement;