Tip

Error handler code for nasty LotusScript errors tip

This tip contains Generic Error Handler code for use with Dovid Gross's tip Find those nasty LotusScript Web server errors.


Use the following variables for access to the current function and calling function:

 LSI_INFO(2) = Current function LSI_INFO(12) = Calling function

An example of the above is found below, but it can be integrated with Find those nasty LotusScript Web server errors to give easier code snippets, reducing coding errors such as spelling mistakes.

 function function1() on error goto genericerror call subfunction goto ExitCode GenericError: msgbox lsi_info(2) & " / " & lsi_info(12) & ":" & error$ & " at line " & erl() resume ExitCode ExitCode: end function function subfunction() on error goto genericerror ' raise an error error 1 goto ExitCode GenericError: msgbox lsi_info(2) & " / " & lsi_info(12) & ":" & error$ & " at line " & erl() resume ExitCode ExitCode: end function

This was first published in December 2001

There are Comments. Add yours.

 
TIP: Want to include a code block in your comment? Use <pre> or <code> tags around the desired text. Ex: <code>insert code</code>

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
Sort by: OldestNewest

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:

Disclaimer: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.