Why is my exception handling code not handling exceptions?
<p>I have some C# code that pulls down a remote website using the HttpWebRequest class.  I'm handling errors with a try/catch, but some errors (like Webrequest and IOException) don't seem to be getting "caught" with the way I have it setup:</p>

<pre><code>try
{
    StartScrap("http://www.domain.com");
}
catch (Exception ex)
{
    LogError(ex.ToString();
}


private void StartScrap(string url)
{
    HttpWebRequest webRequest = (HttpWebRequest)WebRequest.Create(url);

    HttpWebResponse response = (HttpWebResponse)webRequest.GetResponse();

    if (response.StatusCode == HttpStatusCode.OK)
    {
        Stream responseStream = response.GetResponseStream();
        string responseText = String.Empty;

        using (StreamReader readerStream = new StreamReader(responseStream, System.Text.Encoding.UTF8))
        {
            responseText = readerStream.ReadToEnd(); &lt;-- I will sometimes get a Webexception error here that won't get caught above and stops the code
        }
    }
}
</code></pre>

<p>Update: There is more to the code, so maybe it is something outside of the code I posted?  I am basically using this code in a Windows Application on a form that has a NotifyIcon. I'm using the Timer class to run the code at a certain timer interval.  This is how I have it setup:</p>

<pre><code>    public TrayIcon()
    {
        InitializeComponent();
    }

    private void TrayIcon_Load(object sender, EventArgs e)
    {
        try
        {
            StartScrap("http://www.domain.com");
        }
        catch (Exception ex)
        {
            LogError(ex.ToString());
        }
        finally
        {
            StartTimer();
        }
    }

    private void StartTimer()
    {
        Timer Clock = new Timer();
        Clock.Interval = 600000;
        Clock.Start();
        Clock.Tick += new EventHandler(TrayIcon_Load);
    }
</code></pre>
