Mercurial > gemma
comparison pkg/imports/wx.go @ 4062:6c760abcff0e
Move handling of PostgreSQL errors to own package
author | Tom Gottfried <tom@intevation.de> |
---|---|
date | Thu, 25 Jul 2019 11:32:22 +0200 |
parents | 6c5c15b2fb64 |
children | fe3dd65c0891 |
comparison
equal
deleted
inserted
replaced
4061:f391497287fb | 4062:6c760abcff0e |
---|---|
21 "errors" | 21 "errors" |
22 "fmt" | 22 "fmt" |
23 "io" | 23 "io" |
24 "time" | 24 "time" |
25 | 25 |
26 "gemma.intevation.de/gemma/pkg/common" | 26 "gemma.intevation.de/gemma/pkg/pgxutils" |
27 "gemma.intevation.de/gemma/pkg/wfs" | 27 "gemma.intevation.de/gemma/pkg/wfs" |
28 ) | 28 ) |
29 | 29 |
30 // WaterwayAxis is an import job to import | 30 // WaterwayAxis is an import job to import |
31 // the waterway axes in form of line string geometries | 31 // the waterway axes in form of line string geometries |
319 case err == sql.ErrNoRows: | 319 case err == sql.ErrNoRows: |
320 *outside++ | 320 *outside++ |
321 // ignore -> filtered by responsibility_areas | 321 // ignore -> filtered by responsibility_areas |
322 return nil | 322 return nil |
323 case err != nil: | 323 case err != nil: |
324 feedback.Warn(common.HandlePGError(err).Error()) | 324 feedback.Warn(pgxutils.HandlePGError(err).Error()) |
325 default: | 325 default: |
326 *features++ | 326 *features++ |
327 } | 327 } |
328 return nil | 328 return nil |
329 } | 329 } |