Is there any way to have a "default error handler" that handles ALL errors within a vb.net executable?
That is, whenever ANY type of error occurs, the program calls this one procedure only, and no auto-generated error messages are displayed?
Printable View
Is there any way to have a "default error handler" that handles ALL errors within a vb.net executable?
That is, whenever ANY type of error occurs, the program calls this one procedure only, and no auto-generated error messages are displayed?
I've never seen error-handling used that way . You need them in case you suspect fragment of code would generate an error whether from the user or your code itself. e.g : when load a file (image , text..etc) , open database , wrong input in any control ,.. etc .Basically , enclose that code in error-handling routine and them grasp that error through using Exception class , then it's up to you if you want to show a descriptive error message or not .
Try this, it might help you out a lot.
http://msdn.microsoft.com/library/de...ml/emab-rm.asp
Thanks. Will be sure to check that out later on.