diff src/java/de/intevation/mxd/reader/MXDReader.java @ 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 a9684178cb29
children 503d3a453a04
line wrap: on
line diff
--- 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();
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)