Home | Computer
For years, the weak part of most of the languages supported by Microsoft has been the error handling capability. In most cases this error handling was a variant of 2 statements: On Error Goto; and On Error Resume Next Which resulted in branching to an End statement, or continuing on as if nothing had happened. Taking a page from the Java model, Microsoft, in order to achieve cross platform uniformity with all of the .Net languages, has adopted the Try..Catch..Finally..End Try method of handling errors. This allows an error to be handled in the routine in which it occurs. If the exception is not caught, it is referred to the calling procedure, and so on and so on. If no exception is caught by the end of the calling chain, the user is notified by a dialog box. Exception objects have 4 properties in common. The Message property is the text which describes the error. It is similar to the old Err.description. StackTrace returns a string which traces the path from where the exception was originally thrown. The Source property return s the name of the routine where the exception was thrown. This is analogous to Err.Source. HelpLink returns the URL or URN to the helpfile associated with the error.
Article Source:- Link Building
Please Rate this Article
5 out of 54 out of 53 out of 52 out of 51 out of 5
Not yet Rated