aboutsummaryrefslogtreecommitdiff
path: root/cmd/links
diff options
context:
space:
mode:
authorale <ale@incal.net>2018-08-31 09:57:06 +0100
committerale <ale@incal.net>2018-08-31 09:57:06 +0100
commit70c12b7a5de3fe635f4f49aa7e249f5d6141d2af (patch)
treebb532cda2f759f77e61508600cfc1f23e37bb7ba /cmd/links
parent98e2528f410908e50b4be3a2d5f6ed2b5f32bd2c (diff)
downloadcrawl-70c12b7a5de3fe635f4f49aa7e249f5d6141d2af.tar.gz
crawl-70c12b7a5de3fe635f4f49aa7e249f5d6141d2af.zip
Improve error handling, part two
Handler errors are fatal, so that an error writing the WARC output will cause the crawl to abort.
Diffstat (limited to 'cmd/links')
-rw-r--r--cmd/links/links.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/cmd/links/links.go b/cmd/links/links.go
index 9cd741f..5f76a6a 100644
--- a/cmd/links/links.go
+++ b/cmd/links/links.go
@@ -22,12 +22,13 @@ var (
func extractLinks(c *crawl.Crawler, u string, depth int, resp *http.Response, err error) error {
if err != nil {
- return err
+ return nil
}
links, err := analysis.GetLinks(resp)
if err != nil {
- return err
+ // Not a fatal error, just a bad web page.
+ return nil
}
for _, link := range links {