mohankreddy / crawler4j

Automatically exported from code.google.com/p/crawler4j
0 stars 0 forks source link

If uncatched exception is thrown in overloaded visit method of webcrawler in log stacktrace is not shown #184

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Introduce some of code within visit methods of a class that extends 
WebCrawler that will throw uncatched excpetio NullpointerException
2. Configure log4j to log everything to a desired destination
2. Run the application as a daemon, so System.out of java will point to 
/dev/null
3. The stack of an exceptions is not printed at all. In log file the only thing 
that is printed is "nullpointer exception while processing <url>. Where url is 
actual url being processed.   It also logs that exception was caught in 
WebCrawler class at line 310

What is the expected output? What do you see instead?
Expected results:
If all logs are switch on the full stacktrace should be loged.

In log one may see only "excpeption xxx while processing url".

I suggest also not use e.printstracktrace(), but only print exception via 
logging.

What version of the product are you using?

3.3

Original issue reported on code.google.com by Bogdan.A...@gmail.com on 18 Jan 2013 at 10:51

GoogleCodeExporter commented 9 years ago
proposed changes

Original comment by Bogdan.A...@gmail.com on 18 Jan 2013 at 11:11

Attachments:

GoogleCodeExporter commented 9 years ago
What version of the product are you using?

3.4 as whell

Original comment by Bogdan.A...@gmail.com on 19 Jan 2013 at 11:50

GoogleCodeExporter commented 9 years ago
This issue was closed by revision 8f3be74249bc.

Original comment by ganjisaffar@gmail.com on 3 Mar 2013 at 7:24