February 09, 2007

How to Handle Errors on LotusScript

Function test(param1 As String) As Integer
Test = False
On Error Goto errorhandler
' do something here!
Test = True
exitFunction:
Exit Function
errorhandler:
Call raiseError()
Resume exitfunction
End Function

Function raiseError() As Integer
raiseError = False
' Remember. No error trapping here!
Print "Run time error: (" & Cstr(Err) & ":" & Error$ & " at line: " & Cstr(Erl)
raiseError = True
Exit Function
End Function

Function raiseError() As Integer
raiseError = False
Print "Run time error: (" + Cstr(Err) & ":" & Error$ & " at line: " & Cstr(Erl) & _
" called from: " & Getthreadinfo(11) & " in module: " & Getthreadinfo(10)
raiseError = True
End Function

Domino Notes LotusScript
Posted by philipz at February 9, 2007 03:07 PM
歷史上的今天
Comments
Post a comment













Remember personal info?