Error Handling

ayozzhero

Well-known member
Joined
Apr 6, 2005
Messages
186
Location
Malaysia
Programming Experience
1-3
Is there a way I can put general error trapping/handling. Or do I need to put Try...Catch...Finally in each sub and function?

What I am trying to do is to detect any error that might happen then displaying a form (frmError) to the user. The main purpose is not to end the application when an error happens.
 

JuggaloBrotha

VB.NET Forum Moderator
Staff member
Joined
Jun 3, 2004
Messages
4,524
Location
Lansing, MI; USA
Programming Experience
10+
to my knowledge there is no form-level error handler for .net (IE one error handler for any errors that can occur on a form)

the try/catch blocks are the only form of error handling which means that every sub that could cause an error will need to have a try/catch block around the "potentially" errorful code
 

ayozzhero

Well-known member
Joined
Apr 6, 2005
Messages
186
Location
Malaysia
Programming Experience
1-3
well... sometimes it is painful to know the truth :(

Putting try...catch everywhere... how far will that affect eficiency of the application. Will it slow down the application?

Thank you.
 
Top Bottom