I recently migrated a VB6 application to VB.Net. All dependency VB6 is removed. And the code worked fine only for one module, to say that it works fine for WinApp.
Now my requirement has been changed, now several applications will be available to the same class, it can be a Windows application, a web application or a web service. Therefore, I cannot solve any effective error handling pattern.
So you guys are helping me. Currently what I am doing is a parent function, I skip two vars LogError as bool and ErrorMessage as a string parameter that will additionally check something like this
Catch(ex as Exception)
If LogError then
MessageBox.Show("My_Module_Name :" & ex.Message)
EndIf
ErrorMessage = ex.Message
End Try
Also the same catch block is used in all other functions / routines. So I need any elegant processing method that will work efficiently on the cross-application platform (win / web / service)
source
share