summaryrefslogtreecommitdiff
path: root/crawler/utility.go
diff options
context:
space:
mode:
authorhorus2018-02-19 22:54:08 +0100
committerhorus2018-02-19 22:54:08 +0100
commitee92a7e43df5a7272842b1434d20713dcfd06387 (patch)
tree8f48d2017031f0572aec0a2b32a48bcac0fa778d /crawler/utility.go
parent13b1e31cb91f5af98951f4353d49429f356d7f12 (diff)
downloadalkobote-ee92a7e43df5a7272842b1434d20713dcfd06387.tar.gz
Less Fatal(), more Warn(). (crawler)
Diffstat (limited to 'crawler/utility.go')
-rw-r--r--crawler/utility.go6
1 files changed, 4 insertions, 2 deletions
diff --git a/crawler/utility.go b/crawler/utility.go
index a90de91..5fa78c4 100644
--- a/crawler/utility.go
+++ b/crawler/utility.go
@@ -146,7 +146,8 @@ func get_volume(e *colly.HTMLElement) (float32, string) {
volume, err := extract_volume(volume_noisy)
if err != nil {
- Fatal(err, "Get Volume: Extract Volume failed: "+volume_noisy)
+ Warn(err, "Get Volume: Extract Volume failed: "+volume_noisy)
+ return 0, err.Error() + " // volume_noisy: " + volume_noisy
}
return volume, ""
@@ -166,7 +167,8 @@ func get_abv(e *colly.HTMLElement) (float32, string) {
abv, err := extract_abv(abv_noisy)
if err != nil {
- Fatal(err, "Get ABV: Extract ABV failed: "+abv_noisy)
+ Warn(err, "Get ABV: Extract ABV failed: "+abv_noisy)
+ return 0, err.Error() + " // abv_noisy: " + abv_noisy
}
return abv, ""