SysTest.getCurrentException Method [AX 2012]

Returns the current exception message if one exists.

Syntax

private str getCurrentException(int _line)

Run On

Called

Parameters

  • _line
    Type: int
    The exception value.

Return Value

Type: str
The current exception message if one exists; otherwise, a blank string.

Remarks

If a class throws an exception but the exception or error message differs from what is expected, the test will fail and the SysTest class will correctly report the expected exception or error message.

See Also

SysTest Class

SysTestCase Class

SysTestSuite Class

Unit Test Framework

Walkthrough: Testing a Class Using the Unit Test Framework