[Htmlparser-user] can't catch parser.setURL() exception
Brought to you by:
derrickoswald
|
From: Wen <log...@ya...> - 2006-04-18 05:47:36
|
Hi
I have a code like this:
Parser parser = new Parser();
try{
parser.setURL("http://www.pbs.org/journeyintoamazonia");
}catch(ParserException pe){
pe.printStackTrace();
}
However, the try-catch brace can't catch the exception. I still got the following exception and the execution stopped in this case.
org.htmlparser.util.ParserException: Connection timed out: connect;
java.net.ConnectException: Connection timed out: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(Unknown Source)
at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
Does anyone know what's happening?
p.s. thanks Derrick. Your solution for my last reply is working fine. : )
wen
---------------------------------
Love cheap thrills? Enjoy PC-to-Phone calls to 30+ countries for just 2¢/min with Yahoo! Messenger with Voice. |