I support an application that uses the Notes search query language to find documents and copies information into a report. There are times when a user may not have access to all the documents defined by one of these queries. Instead of just leaving these documents out of the search results document collection, Notes includes an instance of the inaccessible document which causes an error in the processing. Does anyone know how to exclude these documents from the search results?
Subject: Error handling
Can’t you just catch the error and do a resume that makes your script run on?
on error goto eHandler
… try to access document
resumeLabel:
set pointer = collection.getnextdoc
eHandler:
if errorcode = no access then resume reumeLabel
else resume exitHandler
Subject: Error Handling inassessable documents
I have not found a good way to find these documents in the collection without trying to access them. This causes the code to run a lot slower and may cover up a real error in the future. Plus I would like to be able to display an accurate document count to the users before I start processing the collection. I get many questions about why the count before the processing is different from the number of documents they actually end up with.