I'm a little lost as to how to continue the program execution with this LotusScript snippet. It extracts all the documents from a view, however, it is hitting a certain document that contains an 'Overflow' error which stops the program, rather than ignoring this and continuing to the next document. The error message is being printed out, so it's clear that the code is entering the ErrorHandler, and then subsequently ends.
Option Public
Option Declare
Sub Initialize
'init stuff, etc
Set view = db.getView("Main")
Set doc = view.getFirstDocument()
Set lastDoc = view.getLastDocument()
k = 0
While (Not doc is Nothing)
dealId = doc.DealId(0)
If(doc.HasEmbedded) Then
Set body = doc.GetFirstItem("Body")
If(Not body Is Nothing) Then
'code to extract all attachments on a document
End If
End If
nextDoc:
Set doc = view.getNextDocument(doc)
k = k + 1
Wend
Exit Sub
errHandler:
Print "Get error when process document with dealId=" & dealId & " at line " & CStr(Erl) & ". Err=" & CStr(Err) & ", error=" & Error
GoTo nextDoc
'this should continue execution of nextDoc
End Sub