[Htmlparser-user] Not able to catch ParserException
Brought to you by:
derrickoswald
|
From: <oys...@me...> - 2007-01-10 15:22:02
|
Hi list! :-]
I seem to have a problem catching the ParserException when using
StringExtractor.
My console says:
org.htmlparser.util.ParserException: Exception getting input stream from
(and so on...)
...but my logger (log4j) does not print and the string "test" is not
written to the console.
String content = "";
try {
StringExtractor se = new StringExtractor(url);
content = se.extractStrings(false);
System.out.println(content);
}
catch(ParserException e){
logger.error("Could not parse url",e);
System.out.println("test");
}
Could the exception be handled some place else that I'm not aware of?
The string "content" is sometimes empty due to a 401 error.
Thanks in advance for any reply!
Best regards,
Øystein
|