Mercurial > dive4elements > river
changeset 9651:eb3dfe900d8c
Importer (s/u-info) extensions: better exception handling
author | mschaefer |
---|---|
date | Mon, 23 Mar 2020 15:00:04 +0100 |
parents | a2a42a6bac6b |
children | dd93bb84561d |
files | backend/src/main/java/org/dive4elements/river/importer/parsers/BedHeightParser.java backend/src/main/java/org/dive4elements/river/importer/sinfo/SInfoImporter.java backend/src/main/java/org/dive4elements/river/importer/uinfo/UInfoImporter.java |
diffstat | 3 files changed, 3 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/backend/src/main/java/org/dive4elements/river/importer/parsers/BedHeightParser.java Mon Mar 23 14:57:03 2020 +0100 +++ b/backend/src/main/java/org/dive4elements/river/importer/parsers/BedHeightParser.java Mon Mar 23 15:00:04 2020 +0100 @@ -409,7 +409,7 @@ this.kmExists.add(km); } catch (final ParseException e) { - log.error("Error parsing km '" + values[0] + "': " + e.getMessage()); + log.warn("Error parsing km '" + values[0] + "': " + e.getMessage()); return; } final ImportBedHeightValue value = new ImportBedHeightValue(obj, km, parse(values, ColTitlePattern.HEIGHT),
--- a/backend/src/main/java/org/dive4elements/river/importer/sinfo/SInfoImporter.java Mon Mar 23 14:57:03 2020 +0100 +++ b/backend/src/main/java/org/dive4elements/river/importer/sinfo/SInfoImporter.java Mon Mar 23 15:00:04 2020 +0100 @@ -11,7 +11,6 @@ package org.dive4elements.river.importer.sinfo; import java.io.File; -import java.io.IOException; import java.util.ArrayList; import java.util.List; @@ -183,7 +182,7 @@ /** * Imports the files according to the active parser list */ - public void parse() throws IOException { + public void parse() throws Exception { for (final ImportParser parser : this.parsers) parser.parse(); }
--- a/backend/src/main/java/org/dive4elements/river/importer/uinfo/UInfoImporter.java Mon Mar 23 14:57:03 2020 +0100 +++ b/backend/src/main/java/org/dive4elements/river/importer/uinfo/UInfoImporter.java Mon Mar 23 15:00:04 2020 +0100 @@ -11,7 +11,6 @@ package org.dive4elements.river.importer.uinfo; import java.io.File; -import java.io.IOException; import java.util.ArrayList; import java.util.List; @@ -102,7 +101,7 @@ /** * Imports the files according to the active parser list */ - public void parse() throws IOException { + public void parse() throws Exception { for (final ImportParser parser : this.parsers) parser.parse(); }