Mercurial > dive4elements > river
diff backend/src/main/java/org/dive4elements/river/importer/parsers/PegelGltParser.java @ 7447:82b8bfb47260
Importer and doc: Warn instead of die if AT- or STA-file is missing for a gauge.
author | Tom Gottfried <tom@intevation.de> |
---|---|
date | Fri, 25 Oct 2013 16:57:15 +0200 |
parents | 4c3ccf2b0304 |
children | 5e38e2924c07 |
line wrap: on
line diff
--- a/backend/src/main/java/org/dive4elements/river/importer/parsers/PegelGltParser.java Fri Oct 25 14:32:11 2013 +0200 +++ b/backend/src/main/java/org/dive4elements/river/importer/parsers/PegelGltParser.java Fri Oct 25 16:57:15 2013 +0200 @@ -97,7 +97,17 @@ log.debug("\tat: " + atFile); } - gauges.add(new ImportGauge(range, staFile, atFile)); + if (staFile.exists() && atFile.exists()) { + gauges.add(new ImportGauge(range, staFile, atFile)); + } + else { + if (!staFile.exists()) { + log.warn(staFile + " does not exist. Gauge ignored."); + } + if (!atFile.exists()) { + log.warn(atFile + " does not exist. Gauge ignored."); + } + } } } finally {