LOTUSSCRIPT/COM/OLE CLASSES


Examples: Handling run-time errors
1. This example shows the simplest case of an error handler. The first statement establishes a handler for all errors. The handler prints the error number and message, and exits. If the user enters the name of a non-existent file, an error is raised on "Set dc = db.AllDocuments."
2. This example traps the error that occurs when you later try to use a NotesDatabase object that did not open because of a bad file name specification. In addition, the example handles other errors. If the user enters a bad name, the error handler allows the user to retry or cancel. For a retry, the error handler calls the Open method and then resumes execution in the mainline code.
3. This example tests the effect of the New method with the IsOpen property.
4. This example tests the effect of the Open method by examining its return value.
See Also