comparison flys-backend/src/main/java/de/intevation/flys/importer/Importer.java @ 5106:d16398d65a59 dami

Importer: Print a decent error when failing to parse a gew and exit. This makes the importer easier to debug if you do not get your mysterious errors at some other place.
author Andre Heinecke <aheinecke@intevation.de>
date Tue, 26 Feb 2013 19:39:04 +0100
parents b87e504f916e
children 2fceb5511dc0
comparison
equal deleted inserted replaced
5101:f57b096df75a 5106:d16398d65a59
139 } 139 }
140 try { 140 try {
141 infoGewParser.parse(gewFile); 141 infoGewParser.parse(gewFile);
142 } 142 }
143 catch (IOException ioe) { 143 catch (IOException ioe) {
144 log.error("error while parsing gew: " + gew); 144 log.error("error while parsing gew: " + gew, ioe);
145 System.exit(1);
145 } 146 }
146 } 147 }
147 148
148 String gew = Config.INSTANCE.getInfoGewFile(); 149 String gew = Config.INSTANCE.getInfoGewFile();
149 if (gew != null && gew.length() > 0) { 150 if (gew != null && gew.length() > 0) {
154 } 155 }
155 try { 156 try {
156 infoGewParser.parse(gewFile); 157 infoGewParser.parse(gewFile);
157 } 158 }
158 catch (IOException ioe) { 159 catch (IOException ioe) {
159 log.error("error while parsing gew: " + gew); 160 log.error("error while parsing gew: " + gew, ioe);
161 System.exit(1);
160 } 162 }
161 } 163 }
162 164
163 // Look for official numbers. 165 // Look for official numbers.
164 BundesWasserStrassenParser bwastrIdParser = 166 BundesWasserStrassenParser bwastrIdParser =

http://dive4elements.wald.intevation.org