Mercurial > mxd2map
diff src/java/de/intevation/mxd/reader/RasterLayerReader.java @ 306:ea3fde77ea48
Catch generic Exceptions to avoid leaking them and creating
silent errors
author | Andre Heinecke <aheinecke@intevation.de> |
---|---|
date | Thu, 06 Sep 2012 18:56:20 +0200 |
parents | a9684178cb29 |
children | f9e53dcc7424 |
line wrap: on
line diff
--- a/src/java/de/intevation/mxd/reader/RasterLayerReader.java Wed Sep 05 17:19:19 2012 +0200 +++ b/src/java/de/intevation/mxd/reader/RasterLayerReader.java Thu Sep 06 18:56:20 2012 +0200 @@ -101,7 +101,7 @@ try { layerElement.setAttribute("name", layer.getName()); } - catch(IOException ioe) { + catch(Exception e) { logger.warn( "Could not read layer name." + " Stopped reading layer."); @@ -120,7 +120,7 @@ layerElement.setAttribute("max_scale", String.valueOf(layer.getMaximumScale())); } - catch(IOException ioe) { + catch(Exception e) { logger.warn( "Could not read maximum scale."); } @@ -133,7 +133,7 @@ layerElement.setAttribute("status", "off"); } } - catch(IOException ioe) { + catch(Exception e) { logger.warn( "Could not read layer status." + " Setting layer status to \"on\"."); @@ -142,7 +142,7 @@ try { layerElement.setAttribute("data_source", layer.getFilePath()); } - catch(IOException ioe) { + catch(Exception e) { logger.warn( "Could not read datasource." + " Stopped reading layer " + layer.getName() + ".");