Understand try/catch generally. What event(s) should I be trying to catch?
Thank you,
-KF
"bruce barker" <nospam@dotnet.itags.org.nospam.com> wrote in message
news:%23F79bSINHHA.3288@dotnet.itags.org.TK2MSFTNGP03.phx.gbl...
> please read chapter on try/catch
> -- bruce (sqlwork.com)
> kenfine@dotnet.itags.org.nospam.nospam wrote:For webclient or HttpWebRequest, it normally will throw a
System.Net.WebException, however, any exception can be handled by the super
class "Exception". So you can use either
try
{
}catch(Exception)
{
}
or
try
{
}catch(WebException)
{
}
Sincerely,
Steven Cheng
Microsoft MSDN Online Support Lead
This posting is provided "AS IS" with no warranties, and confers no rights.
Saturday, March 24, 2012
System.Net.Webclient screen scraping: how to gracefully handle 403 (and other) er
Labels:
asp,
barker,
bruce,
catch,
catchthank,
comgt,
event,
generally,
gracefully,
handle,
ltnospamnospam,
net,
scraping,
screen,
systemnetwebclient
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment