diff src/java/de/intevation/mxd/Converter.java @ 86:e19c5eb43099

Instantiate the mapscript writer before loading the MXD file.
author Raimund Renkert <rrenkert@intevation.de>
date Tue, 31 May 2011 15:37:19 +0200
parents f0c02ff120d6
children c285ed08b72c
line wrap: on
line diff
--- a/src/java/de/intevation/mxd/Converter.java	Tue May 31 12:44:31 2011 +0200
+++ b/src/java/de/intevation/mxd/Converter.java	Tue May 31 15:37:19 2011 +0200
@@ -102,15 +102,16 @@
             }
 
             IReader reader = new MXDReader();
+            IWriter writer = new MapScriptWriter(maptemplate, mapfile);
+
             reader.init();
             reader.setFilename(mxdfile);
             reader.read();
 
-            IWriter writer = new MapScriptWriter(maptemplate, mapfile);
             writer.write(reader.getMapDocument());
             reader.shutdown();
         }
-        catch(IOException e) {
+        catch(Exception e) {
             e.printStackTrace();
         }
     }
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)