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