I have this code

Code:
      Try
            Dim myWebRequest As HttpWebRequest = DirectCast(HttpWebRequest.Create(url), HttpWebRequest)
            myWebRequest.Method = "GET"
            myWebRequest.Timeout = (My.Settings.timeout) * 1000

            Dim myWebResponse As HttpWebResponse = DirectCast(myWebRequest.GetResponse(), HttpWebResponse)
            Dim myWebSource As New StreamReader(myWebResponse.GetResponseStream())

            myPageSource = myWebSource.ReadToEnd()
            myWebResponse.Close()
            myWebSource.Close()
            myWebRequest.Abort()

            Return myPageSource

        Catch ex As Exception
            Return ""
        End Try
If there is an error i would expect it to not throw an error but just return a ""

But when in debug sometimes I get an error thrown at this line:
Code:
            Dim myWebResponse As HttpWebResponse = DirectCast(myWebRequest.GetResponse(), HttpWebResponse)
And it shows the dialog box. Is this because its in debug mode. Im quite sure this is not true. So why is it showing the error even the whole code is in a Try Catch loop