Resume after error

sampoo

Active member
Joined
Jun 12, 2004
Messages
25
Location
Belgium
Programming Experience
3-5
Hi,

My program should iterate through all items in a listview.It uses a Try structure to handle errors. The problem is, that the program does what it should but when an error occurs, it stops iterating through the list. So i want it to resume with the next item in the list when an error occurs. Is there a simple way to do so?

thanks

This might be of any help:

VB.NET:
   Public Function GetFileInformation(ByVal sURL As String) As FileInformation
  		Try
  			Dim URLReq As Net.HttpWebRequest
  			Dim URLRes As Net.HttpWebResponse
  			URLReq = Net.WebRequest.Create(sURL)
  			URLRes = URLReq.GetResponse
  
  			GetFileInformation.FileSize = URLRes.ContentLength
  			GetFileInformation.Status = "Waiting"
  
  		Catch ex As Exception
  			GetFileInformation.Status = "Error"
  		End Try
  	End Function
 
Last edited:
Srry already fixed. I had seen too late that the function doesn't iterate but the sub that calls it... (Stupid me :D)
So the problem is fixed...
 
Back
Top