$AssertFunction

$AssertFunction

specifies a function to apply to assertions that fail.

Details

Examples

Basic Examples  (1)

You can change the behavior when an assertion fails by assigning to $AssertFunction. This function throws an exception when an assertion fails:

Here the exception thrown by the assertion function is caught:

Introduced in 2010
 (8.0)