This minimal error handling suite does very little, but it’s also very useful: any error is caught, context info is appended and the error is thrown again. To simplify and clarify all the code, the suite must be included in a LotusScript file at the very top of each Sub or Function.

Usage

Sub Initialize %INCLUDE "error_handling" Dim args As Variant args = "RAPUTA" Call Outer( args ) End Sub

Call this file error_handling.lss and store it in the notes folder

'catch any error & throws it again, decorated On Error Goto HandleError Goto EnterProc HandleError: Error Err, Getthreadinfo( 1 ) & " : " & Erl & Chr$( 10 ) & Error$ EnterProc: