G
Guest
Now I am debugging a buggy VB.NET function like following
Function foo()
Try
‘ many loops and codes and nested try catch here!
……
Catch (ex as Exception)
Msgbox ex.message
Finally
…
end try
End function
My headache is: when it causes an exception, it’s very hard for me to locate
which line causes the error. I remember if I use the “On Error Goto
Err_Hanlder†method, I can always use a simple “Resume†statement to help me
locate the buggy line. But I heard the VB’s “On Error GoTo†is not
recommended and also remember I can only use the â€try catch†in C#, C++ or
Java.
Question: Is there an easy method to achieve the same effect as the resume
(I mean for debugging purpose)? or can I set the IDE to break at the buggy
line instead of at the catch block? Is this a legitimate reason that favor
“On Error Goto†more than “Try Catch�
Look forward your insight.
James
Function foo()
Try
‘ many loops and codes and nested try catch here!
……
Catch (ex as Exception)
Msgbox ex.message
Finally
…
end try
End function
My headache is: when it causes an exception, it’s very hard for me to locate
which line causes the error. I remember if I use the “On Error Goto
Err_Hanlder†method, I can always use a simple “Resume†statement to help me
locate the buggy line. But I heard the VB’s “On Error GoTo†is not
recommended and also remember I can only use the â€try catch†in C#, C++ or
Java.
Question: Is there an easy method to achieve the same effect as the resume
(I mean for debugging purpose)? or can I set the IDE to break at the buggy
line instead of at the catch block? Is this a legitimate reason that favor
“On Error Goto†more than “Try Catch�
Look forward your insight.
James