Debug.addOnDisplayAssert

Overview | Methods | This Package | All Packages

Debug.addOnDisplayAssert

Adds an event handler to display an assertion dialog box.

Syntax

public static synchronized void addOnDisplayAssert( DebugMessageEventHandler handler )

Parameters

handler

The DebugMessageEventHandler delegate to route assertions to.

Remarks

Assertion dialog boxes are typically displayed when an unexpected situation occurs in a program, such as hitting the default case of a switch statement when all the values should be covered.

Use the addOnDisplayAssert method to display your own assertion dialog box. The default behavior of the Debug class is to display a Windows message box that contains an assertion message.

See Also   assert, removeOnDisplayAssert