Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

This improves the way Nutch is erroring out, at least for local mode. #830

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

HiranChaudhuri
Copy link
Contributor

Nutch will print more information to the logfile - which in local mode ends up on the terminal.
Not sure what will happen in distributed mode though.

curTime = conf.getLong("injector.current.time",
System.currentTimeMillis());
url404Purging = conf.getBoolean(CrawlDb.CRAWLDB_PURGE_404, false);
} catch (Exception e) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Exception is very vague. I would suggest we figure out what types of Exception's are thrown then catch and raise them instead. What do you think @HiranChaudhuri ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would not know how to define what types of Exceptions can be thrown. Be aware that logging needs to happen for checked and unchecked exceptions. And be aware you cannot see all the code: It loads plugins. Your catch method needs to be compatible to all existing and future code.

So I do not know how to make the catch block any more concise than it is right now. If you can, please show me.

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

Successfully merging this pull request may close these issues.

2 participants