The following pages provide detail information on the exception handling instructions and the properties and methods of the Exception Class. The exception handling statements provide a structured means for a procedure to detect and respond to program execution exceptions that would otherwise cause the procedure to halt execution. When an exception occurs, information on the cause of the exception can be automatically saved in an Exception Object and execution can be branched to a block of code designed to service the exception.
Exception Objects have two basic forms: a general Exception and a robot Exception. Both forms store a numerical code that indicates the type of exception. In addition, the robot Exception includes the number of the robot and the axes that are associated with the exception. The general form of the Exception includes a Qualifier value that can provide addition information on the nature of the exception.
The table below briefly summarizes the exception handling statements that are described in greater detail in the following pages.
Statement | Description |
---|---|
Used within a Try...Catch...Finally...End Try series of statements to mark the start of the block of instructions executed when an exception occurs. |
|
Marks the end of the exception handling structure. |
|
Terminates the execution of a Try or Catch block of instructions. |
|
Used within a Try...Catch...Finally...End Try series of statements to mark the start of the block of instructions that is always executed at the completion of the Try or Catch blocks. |
|
Generates a program execution exception. |
|
Exception handling structure that captures execution exceptions within a block of instructions and executes statements to field the exception if necessary. |
The table below summarizes the properties and methods of the Exception Class that are described in greater detail in the following pages.
Member | Type | Description |
---|---|---|
Property |
Sets and gets a bit mask indicating the robot axes associated with a robot Exception. |
|
Method |
Method that returns a copy of the exception_obj. |
|
Property |
Sets and gets the number of the error message. |
|
Method |
Returns the full text string that is generated based upon the exception_obj properties. |
|
Property |
Sets and gets the error message qualifier for a general Exception. |
|
Property |
Sets and gets the Boolean that indicates if an Exception is a robot or general type. |
|
Property |
Sets and gets the number of the robot associated with a robot Exception. |
|
Method |
Updates a general (vague) Exception error code with a more specific error code. |