Interruption handling in GWS calls (INT_FLAG)
Genero Web Services (GWS) tests INT_FLAG to check if an application has
been interrupted.
If INT_FLAG is set to TRUE, the DVM interrupts the GWS function
processing and an exception is raised with error code -15553.
Important: Set the
INT_FLAG register to FALSE before
calling a GWS function. For example, after a dialog was stopped with a cancel action, the
INT_FLAG is set to TRUE. If you do not reset
INT_FLAG to FALSE, the next GWS function may be canceled.As a general rule, surround GWS calls with a
TRY/CATCH block
(or WHENEVER ERROR handler), to detect both communication errors and
interruptions.TRY
LET INT_FLAG=FALSE
...
CALL req.sendXMLRequest(doc)
...
CATCH
CASE STATUS
WHEN -15553 -- TCP socket error
IF INT_FLAG THEN
MESSAGE "An interruption occurred."
ELSE
ERROR "TCP socket error: ", SQLCA.SQLERRM
END IF
...
END CASE
END TRY