%ERNUM

Return the number of the most recently trapped error

WTSupported in traditional Synergy on Windows
WNSupported in Synergy .NET on Windows
USupported on UNIX
VSupported on OpenVMS
error = %ERNUM

Return value

error

The code number of the error that was most recently trapped. (n)

Discussion

%ERNUM is the same as %ERROR without any of the optional arguments.

Tip

All I/O statements and many subroutines update the value returned by %ERNUM. After you get an error with ONERROR or an I/O error list, we recommend that you use %ERNUM to capture the error immediately, before it is updated by subsequent statements and subroutines, and then store it in a local variable for later processing.

Examples

See %ERLIN Examples.