Click or drag to resize

DebugAssert Method (Boolean, String)

Checks for a condition and displays an assert message on the FlexPendant, containing a stack trace, if the condition is false. When the condition is false, the message, with a stack trace, is also sent out on the network. The message can be displayed in the controller console by enabling the functionality on the controller. Use fpcmd_enable_console_output to enable FlexPendant logging.

Namespace:  ABB.Robotics.Diagnostics
Assembly:  ABB.Robotics (in ABB.Robotics.dll) Version: 6.5.129.0
Syntax
C#
public static void Assert(
	bool condition,
	string message
)

Parameters

condition
Type: SystemBoolean
true to prevent a message being displayed; otherwise, false.
message
Type: SystemString
A message to write.
Examples
This example displays and logs an error message if the condition is not fulfilled.
Debug.Assert(myobj.State==RUNNING, string.Format("Operation not allowed in current state: {0}", myobj.State.ToString()));
See Also