Mercurial > dive4elements > river
diff backend/src/main/java/org/dive4elements/river/importer/parsers/WstParser.java @ 7339:40e5ad76103c
WST Import: Added parse error exception to WST parser.
author | Sascha L. Teichmann <teichmann@intevation.de> |
---|---|
date | Tue, 15 Oct 2013 18:31:59 +0200 |
parents | c894b7b45c4c |
children | 2ce7bacc940f |
line wrap: on
line diff
--- a/backend/src/main/java/org/dive4elements/river/importer/parsers/WstParser.java Tue Oct 15 17:39:04 2013 +0200 +++ b/backend/src/main/java/org/dive4elements/river/importer/parsers/WstParser.java Tue Oct 15 18:31:59 2013 +0200 @@ -85,6 +85,15 @@ this.wst = wst; } + public static final class ParseException extends Exception { + public ParseException() { + } + + public ParseException(String msg) { + super(msg); + } + } // class ParseException + /** Returns a new ImportTimeInterval with a date guessed from string. */ public static ImportTimeInterval guessDate(String string) { try { @@ -105,7 +114,7 @@ return null; } - public void parse(File file) throws IOException { + public void parse(File file) throws IOException, ParseException { log.info("Parsing WST file '" + file + "'");