Message 1 of 6
Error Trapping
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
In VB6 I used to use
On Error GoTo My_Error
'Code
On Error GoTo 0
Exit Sub
My_Error:
MsgBox "Error " & Err.Number & " (" & Err.Description & ") on line " & Erl & " in procedure MyProcedure of Module MyModule"
By using this in VB.net it the error is skipped and it jumps to the error routine. Easily added using MZ tools.
The same code doesn't report what line but at least reports an error.
Using the Try, Catch & Finally method often just crates a fatal error and I have to step through code trying to work out what the problem is.
A big problem is that I have spent a long time creating an application with several reactors. I'm not sure if I will ever figure out why it is creating fatal errors.
Is there some reading material that can help me trap errors or work out if I have not disposed of something that should have been?