LOTUSSCRIPT/COM/OLE CLASSES


Examples: LogError method
1. This script logs a Domino error to a file. The lsERR_NOTES_DATABASE_NOTOPEN error occurs when a database cannot be opened; here, it occurs if Domino cannot locate the current user's mail database after the call to the OpenMail method. If this happens, control passes to the logDbOpenError label, and the error code and string get placed into the file LOG.TXT. For example, the line in LOG.TXT looks like this:
2. This script logs a user-defined error to a file. The script performs a full-text search on the current database, looking for the word "Rocks." If it does not find any matching documents, the script logs an error to another database on the same computer. Neither Domino nor LotusScript considers this condition to be an error, but you can use the LogError method to log any condition that prevents the successful completion of a script.
3. This agent script logs a LotusScript error to a mail memo. The error ErrDivisionByZero occurs when a script attempts to divide a number by zero. When this happens, control passes to the LogThisError label, where the LogError method adds a line of text to the body of the mail memo, which looks like this:
4. The call to OpenMailLog in the third script (above) is replaced with the following:
5. The call to OpenMailLog in the third script (above) is replaced with the following:
See Also