Mercurial > mxd2map
diff src/java/de/intevation/mxd/reader/FeatureLayerReader.java @ 118:39957898c694
Improved top level exception handling and logging.
author | Raimund Renkert <rrenkert@intevation.de> |
---|---|
date | Thu, 16 Jun 2011 14:06:09 +0200 |
parents | 6c3d880db7c5 |
children | 5991c1f90f91 |
line wrap: on
line diff
--- a/src/java/de/intevation/mxd/reader/FeatureLayerReader.java Thu Jun 16 12:05:34 2011 +0200 +++ b/src/java/de/intevation/mxd/reader/FeatureLayerReader.java Thu Jun 16 14:06:09 2011 +0200 @@ -58,7 +58,8 @@ * * @return The layer XML element. */ - public Element read() { + public Element read() + throws IOException{ logger.debug("read()"); Element layerElement; try { @@ -66,7 +67,9 @@ } catch(Exception e) { logger.error("Failed to create DOM-Element for Layer."); - return null; + throw new IOException( + this.getClass()+toString() + + "Error creating dom element"); } try { @@ -157,7 +160,9 @@ } catch(IOException ioe) { logger.warn("Could not read datasource. Stopped reading layer."); - return null; + throw new IOException( + this.getClass().toString() + + "Error reading datasource."); } try { @@ -198,7 +203,9 @@ logger.error( "Could not read layer datasource." + " Stopped reading layer."); - return null; + throw new IOException( + this.getClass().toString() + + " Error reading data source."); } return layerElement; }