Error handling – HP NonStop G-Series User Manual
Page 68

Error Handling
Creating Client Applications
4–12
110838 Tandem Computers Incorporated
EXECUTE ([BEGINTRANSACTION])
EXECUTE ([SEND])
REQUEST ("REPLY-HEADER.REPLY-CODE"), into MyVariableReplyCode
if MyVariableReplyCode = 1
EXECUTE([ENDTRANSACTION])
else
EXECUTE([ABORTTRANSACTION])
TERMINATE
Note
This code is for illustration purposes only—it is not from any particular client application development tool.
Error Handling
The DDE Execute, Poke, and Request functions can return a DDE “not processed”
error to your client application. This error occurs when the Tandem DDE Gateway
cannot process the DDE function. The Tandem DDE Gateway will display an error
message in its screen area and, if iconized, it will beep and flash its icon. To view the
error, activate the Tandem DDE Gateway by double clicking its icon.
Your client application can also display the error after retrieving it from the Tandem
DDE Gateway with special DDE Request functions. For information on how to trap
the DDE “not processed” error, see the DDE documentation in the manual for the tool
with which you are developing your client application.
To retrieve error information with your client application from the Tandem DDE
Gateway after a DDE “not processed” error has occurred, use DDE Request functions
with a clipboard format of CF_TEXT and the following DataElementName parameters:
_TDMGW-ERROR-MSG-SUBSYS, which identifies the internal component
(“subsystem”) of the Tandem DDE Gateway that reported the error (can be up to 8
characters excluding the null-byte terminator).
_TDMGW-ERROR-MSG-NUMBER, which uniquely identifies an error within a
Tandem DDE Gateway “subsystem” (can be up to 5 digits excluding the null-byte
terminator).
_TDMGW-ERROR-MSG-TYPE, which is a single character (plus null-byte
terminator) that indicates whether the error causes the Tandem DDE Gateway
icon to flash (I = no flashing, F = flashing).
_TDMGW-ERROR-MSG-TEXT, which is the message text (can be up to 512
characters excluding the null-byte terminator).
After displaying error information with you client application, you can stop the
Tandem DDE Gateway’s flashing and clear the error message from its main screen by
using the DDE Execute function CLEARERROR command.
There is one case where a DDE “not processed” error is returned to your application,
but you cannot retrieve detailed error information. If you do an element-by-element
DDE Poke or DDE Request function and the clipboard format is not supported by the
Tandem DDE Gateway, then there is no detailed error information provided. This
happens because client applications such as Microsoft Excel may hunt for supported
clipboard formats by using DDE Poke and DDE Request functions many times for the