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