Consultor Eletrônico



Kbase 18670: How to Trap Errors with ActiveX Controls
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   10/16/2008
Status: Verified

GOAL:

How to Trap Errors with ActiveX Controls

FACT(s) (Environment):

Windows 32 Intel
Windows NT 32 Intel/Windows 2000
Windows 32 Intel

FIX:

Using the NO-ERROR clause with an ActiveX method allows any error messages to be captured with the following code:

SomeComHandle:SomeMethodCall(....) NO-ERROR.
IF ERROR-STATUS:NUM-MESSAGES > 0 THEN
DO i = 1 to ERROR-STATUS:NUM-MESSAGES:
MESSAGE ERROR-STATUS:GET-MESSAGE(i).
END.