Mercurial > gemma
comparison 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 |
comparison
equal
deleted
inserted
replaced
1827:27c4effba5b1 | 1828:1ecfcf46e4da |
---|---|
253 }); err != nil { | 253 }); err != nil { |
254 feedback.Error("Downloading features failed: %v", err) | 254 feedback.Error("Downloading features failed: %v", err) |
255 return nil, err | 255 return nil, err |
256 } | 256 } |
257 | 257 |
258 if badProperties > 0 { | |
259 feedback.Warn("Bad properties: %d", badProperties) | |
260 } | |
261 | |
262 if missingProperties > 0 { | |
263 feedback.Warn("Missing properties: %d", missingProperties) | |
264 } | |
265 | |
266 if len(unsupported) != 0 { | |
267 feedback.Warn("Unsupported types found: %s", unsupported) | |
268 } | |
269 | |
258 if features == 0 { | 270 if features == 0 { |
259 err := errors.New("No features found") | 271 err := errors.New("No features found") |
260 feedback.Error("%v", err) | 272 feedback.Error("%v", err) |
261 return nil, err | 273 return nil, err |
262 } | 274 } |
263 | 275 |
264 if badProperties > 0 { | |
265 feedback.Warn("Bad properties: %d", badProperties) | |
266 } | |
267 | |
268 if missingProperties > 0 { | |
269 feedback.Warn("Missing properties: %d", missingProperties) | |
270 } | |
271 | |
272 if len(unsupported) != 0 { | |
273 feedback.Warn("Unsupported types found: %s", unsupported) | |
274 } | |
275 | |
276 if err = tx.Commit(); err == nil { | 276 if err = tx.Commit(); err == nil { |
277 feedback.Info("Storing %d features took %s", | 277 feedback.Info("Storing %d features took %s", |
278 features, time.Since(start)) | 278 features, time.Since(start)) |
279 } | 279 } |
280 | 280 |