exception_object.RobotError Property

Sets and gets the Boolean that indicates if an Exception is a robot or general type.

exception_object.RobotError =<boolean_value>
-or-
...exception_object.RobotError

Prerequisites

None

Parameters

None

Remarks

Setting the RobotError property of an exception_object to True indicates that it is a robot Exception and therefore has a RobotNum and an Axis property.  Otherwise, setting RobotError to False indicates that the exception_object is a general Exception and has a Qualifier property. Both robot and general Exceptions have the same effect in terms of halting thread execution and disabling robot power.  The only difference between the two types of Exceptions is which additional properties exist to further refine the interpretation of the error code. When a New Exception is created, it defaults to a general Exception.  To switch between robot and general Exception types, the RobotError property should be set as needed.

Examples

Dim exc1 As New Exception       ' Create new general exception
exc1.RobotError = True ' Indicate its a robot error
exc1.ErrorCode = -1006 ' *Robot already attached*
exc1.RobotNum = 3 ' Specify the robot
Console.WriteLine(exc1.Message) ' *Robot already attached* Robot 3

See Also

Exception Handling