ERRMOD

Return the module in which the most recent error occurred

WTSupported in traditional Synergy on Windows
WNSupported in Synergy .NET on Windows
USupported on UNIX
VSupported on OpenVMS
xcall ERRMOD([module], [line][, unmangle])

Arguments

module

(optional) A field or record that is returned with the name of the module in which the most recent error occurred. (a)

line

(optional) A field that is returned with the line number of the module in which the most recent error occurred. (n)

unmangle

(optional) One of the following values:

0 = The mangled name is returned. (default)

nonzero = The method name is returned unmangled.

Discussion

The module name is moved to module according to the rules for moving alpha data. The line number is moved to line according to the rules for moving numeric data.

When the error module is a method, the method signature is also returned, and it can be quite large.

Note

The ERRMOD routine is not supported in multi-threaded scenarios, and you must use TRY-CATCH under these circumstances.

Important

With Synergy .NET, line has the following restrictions:

  • Line number information is accurate for Windows desktop and server applications only if the program is built in debug mode. And for x86 systems, if an application is built in debug mode, ERRMOD returns the line number of the next executable line (if one exists) after the line for the requested routine. This is a Microsoft .NET Framework CLR limitation.
  • Line is ignored when using an I/O error list.

See also

Assignment statements for the rules for moving alpha and numeric data