Mercurial > mxd2map
changeset 310:be441fa4bed0
Throw an exception in case reading Raster layer fails
author | Andre Heinecke <aheinecke@intevation.de> |
---|---|
date | Fri, 14 Sep 2012 11:50:40 +0200 |
parents | e8021f3e411a |
children | c8b8f887ef80 |
files | ChangeLog src/java/de/intevation/mxd/reader/MXDReader.java |
diffstat | 2 files changed, 8 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Fri Sep 14 11:48:52 2012 +0200 +++ b/ChangeLog Fri Sep 14 11:50:40 2012 +0200 @@ -1,3 +1,8 @@ +2012-09-14 Andre Heinecke <aheinecke@intevation.de> + + * src/java/de/intevation/mxd/reader/MXDReader.java: + Throw exception in case a RasterLayer read fails + 2012-09-14 Andre Heinecke <aheinecke@intevation.de> * src/java/de/intevation/mxd/reader/FeatureLayerReader.java:
--- a/src/java/de/intevation/mxd/reader/MXDReader.java Fri Sep 14 11:48:52 2012 +0200 +++ b/src/java/de/intevation/mxd/reader/MXDReader.java Fri Sep 14 11:50:40 2012 +0200 @@ -257,6 +257,9 @@ new RasterLayerReader(layer); lr.setUtil(util); Element layerElement = lr.read(); + if(layerElement == null) { + throw new IOException ("Error reading RasterLayer."); + } /* TODO implement support for classes in Raster Layers IRasterRenderer renderer = ((RasterLayer)layer).getRenderer();