%U_GETWNDERR

Get a window system error

WSupported on Windows
USupported on Unix
VSupported on OpenVMS
NSupported in Synergy .NET
window_error = %U_GETWNDERR([text])

or

xcall U_GETWNDERR([text])

window_error

The window system error. (^VAL)

text

(optional) Returned with the error message text. (a)

%U_GETWNDERR returns the error number of the last window error returned as a result of Toolkit calling a Synergy windowing API routine (which it often does when you call a Toolkit routine). For information on window errors, see $ERR_WNDERR.

If a Toolkit routine returns a Toolkit error, %U_GETWNDERR returns the accompanying window error number (not the Toolkit error number) in window_error. (The routine that returned the error returns the number for the Toolkit error.) For example, if you pass the error argument for L_CLASS and Toolkit is unable to create the list class because one already exists with the name you specified, Toolkit returns the Toolkit error number (519) in the error argument for L_CLASS, and it returns the window error number (14) in window_error.

If you pass text, %U_GETWNDERR also returns the text of the window or Toolkit error.

If no Toolkit error has been returned and no window error was returned by the last windowing subroutine call within Toolkit, window_error is returned with 0 and text is returned blank. Note, however, that this function should only be called immediately after a Toolkit routine has signaled that a window error has been trapped. Otherwise, errors that are part of Toolkit’s normal processing may be erroneously returned, or subsequent Toolkit calls to Synergy window API routine may overwrite the error information.