General information
Title:
Error handling advice for VB.Net
I am starting a project to build a dll using VB.Net. My background is in Visual Foxpro. We are at the stage of design where we need to look at error handling strategies and this is one area where vb seems to differ markedly from Fox.
In VFP we have an error method on every class called automatically when a run time error occurs. I program this at my own base class level to accumulate local information and thrn throw the error to a global error handler which writes away the error details and system state to help me sort out the problem. As the error method is called automatically I only put error trap code in other methods if I am deliberately tempting an error.
Ideally, I would like to recreate this situation in VB but if I have understood what I have read (by no means guaranteed) I will have to have a Try,Catch,Finally construct or an OnError statement in each method.
Is this correct? Does anyone have views on error handling strategies that can be adopted, especially for non-windows objects? Any advice would be very welcome.
Thanks
Andrew
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only