[Schmitzm-commits] r1524 - trunk/schmitzm-gt/src/main/java/de/schmitzm/geotools/styling

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Sat Mar 19 17:04:24 CET 2011


Author: alfonx
Date: 2011-03-19 17:04:24 +0100 (Sat, 19 Mar 2011)
New Revision: 1524

Modified:
   trunk/schmitzm-gt/src/main/java/de/schmitzm/geotools/styling/StylingUtil.java
Log:


Modified: trunk/schmitzm-gt/src/main/java/de/schmitzm/geotools/styling/StylingUtil.java
===================================================================
--- trunk/schmitzm-gt/src/main/java/de/schmitzm/geotools/styling/StylingUtil.java	2011-03-19 15:15:19 UTC (rev 1523)
+++ trunk/schmitzm-gt/src/main/java/de/schmitzm/geotools/styling/StylingUtil.java	2011-03-19 16:04:24 UTC (rev 1524)
@@ -135,6 +135,7 @@
 import org.opengis.filter.expression.Function;
 import org.opengis.filter.expression.Literal;
 import org.opengis.filter.expression.PropertyName;
+import org.xml.sax.SAXParseException;
 
 import com.vividsolutions.jts.geom.Geometry;
 import com.vividsolutions.jts.geom.LineString;
@@ -2911,7 +2912,17 @@
 		try {
 			parser.validate(is);
 		} catch (Exception e) {
-			throw new RuntimeException("Exception while parsing " + is, e);
+			LOGGER.error("Got a seriouse Parsing exception",e);
+			ArrayList<Exception> el = new ArrayList<Exception>();
+			el.add(e);
+			
+			if (is != null)
+				try {
+					is.close();
+				} catch (IOException e1) {
+					LOGGER.error("Closing the InputStream after the Seriouse Exception failed",e1);
+				}
+			return el; 
 		}
 
 		return parser.getValidationErrors();



More information about the Schmitzm-commits mailing list