diff pkg/imports/wa.go @ 1828:1ecfcf46e4da

Waterway area/axis: Be more informative if features are bad.
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Wed, 16 Jan 2019 15:35:23 +0100
parents 904c7e853adc
children 272133cd65da
line wrap: on
line diff
--- a/pkg/imports/wa.go	Wed Jan 16 15:29:41 2019 +0100
+++ b/pkg/imports/wa.go	Wed Jan 16 15:35:23 2019 +0100
@@ -255,12 +255,6 @@
 		return nil, err
 	}
 
-	if features == 0 {
-		err := errors.New("No features found")
-		feedback.Error("%v", err)
-		return nil, err
-	}
-
 	if badProperties > 0 {
 		feedback.Warn("Bad properties: %d", badProperties)
 	}
@@ -273,6 +267,12 @@
 		feedback.Warn("Unsupported types found: %s", unsupported)
 	}
 
+	if features == 0 {
+		err := errors.New("No features found")
+		feedback.Error("%v", err)
+		return nil, err
+	}
+
 	if err = tx.Commit(); err == nil {
 		feedback.Info("Storing %d features took %s",
 			features, time.Since(start))