Skip to content
This repository has been archived by the owner on Oct 30, 2018. It is now read-only.

How should I catch com.gravity.goose.network.NotFoundException in Java #93

Open
ryanrozich opened this issue Sep 29, 2014 · 0 comments
Open

Comments

@ryanrozich
Copy link

When trying to run

Article article = goose.extractContent(url);

with a URL that returns a 404 error I see a message logged:

[main] WARN com.gravity.goose.network.HtmlFetcher - com.gravity.goose.network.NotFoundException ==> SERVER RETURNED 404 FOR LINK:

Instead of just logging this exception I would like to catch it and handle it directly in my java code. Is there any way that I can catch and handle Exceptions that relate to HTTP error codes?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant