ActiveX Error Handling

The runtime handles errors that occur during operations involving ActiveX controls similar to the way it handles errors during file I/O or during transactions. If an error cannot 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, and the error handler is executed. 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. See USE Statement for more information about USE.