[PATCH 02 of 12] Importer (s/u-info) extensions: better exception handling

Wald Commits scm-commit at wald.intevation.org
Mon Mar 23 16:38:42 CET 2020


# HG changeset patch
# User mschaefer
# Date 1584972004 -3600
#      Mon Mar 23 15:00:04 2020 +0100
# Node ID eb3dfe900d8ce726331ef11561515ad393222ce2
# Parent  a2a42a6bac6bc16c68e69e0f09405d6af0a0faac
Importer (s/u-info) extensions: better exception handling

diff -r a2a42a6bac6b -r eb3dfe900d8c backend/src/main/java/org/dive4elements/river/importer/parsers/BedHeightParser.java
--- 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),
diff -r a2a42a6bac6b -r eb3dfe900d8c backend/src/main/java/org/dive4elements/river/importer/sinfo/SInfoImporter.java
--- 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();
     }
diff -r a2a42a6bac6b -r eb3dfe900d8c backend/src/main/java/org/dive4elements/river/importer/uinfo/UInfoImporter.java
--- 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();
     }


More information about the Dive4Elements-commits mailing list