DebugAssert Method (Boolean, String, String) |
Checks for a condition and displays an assert message on the FlexPendant, with detailed
information and a stack trace, if the condition is false.
When the condition is false, the message, with detailed information and 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
Syntaxpublic static void Assert(
bool condition,
string message,
string detailedmessage
)
Parameters
- condition
- Type: SystemBoolean
true to prevent a message being displayed; otherwise, false. - message
- Type: SystemString
A message to write. - detailedmessage
- Type: SystemString
A detailed message to display.
ExamplesThis example displays and logs an error message if the condition is not fulfilled.
Debug.Assert(myobj.State==RUNNING, "Operation not allowed in current state", string.Format("state: {0}", myobj.State.ToString()));
See Also