Error Handeling [RESOLVED]
Hi there,
I am trying to find the best way of retrying an operation after I have handled an error; currently i am doing it like this:
my question is, is there better ways in doing this, because some people say that using GoTo is not good practice.
Thanks,
Hi there,
I am trying to find the best way of retrying an operation after I have handled an error; currently i am doing it like this:
VB.NET:
Try
Retry:
customers = DataAccess.LoadCustomers
Catch sqlEx as SqlException
If sqlExl.Number = 1111 Then
GoTo Retry
Else
Msgbox("Can't go on!")
End If
End Try
my question is, is there better ways in doing this, because some people say that using GoTo is not good practice.
Thanks,
Last edited: