ContentsIndexPreviousNext

6.10.10 ActiveX-related Error Handling

The runtime handles errors that occur during operations involving ActiveX controls in a similar way as it handles errors during file I/O or during transactions. If an error occurs that could not be naturally understood and dealt with by the COBOL program by looking at the return value or out-values of a statement, an exception is raised. The system then searches for a "USE After EXCEPTION On OBJECT" statement in the DECLARATIVES section. If such a statement is found, the search stops, the error handler is executed, and if the program has not been terminated, program execution continues after the statement that raised the error. If no "USE After EXCEPTION On OBJECT" statement is found, the runtime determines the action. Usually, a message is presented and the program halts. Refer to Book 3, "Reference Manual" for more information about USE.