|Top Previous Next|
The Try command provides recovery from FreeFlyer error messages and enables the user to perform some measure of diagnostics on the error to determine what went wrong. FreeFlyer suppresses any errors that are produced within the scope of the Try/End block of commands and then populates the Diagnostics object with information related to the error.
Try stepping a Spacecraft for 100 days:
Try, while incrementing an ErrorCount variable if an error is encountered:
•If the "Try sending ErrorCount to ..." syntax option is used, FreeFlyer increments the user-specified "counter" Variable every time an error is encountered and suppressed.
oIn the example shown above, if an error is encountered, the current value of myVariable will be incremented; that is, FreeFlyer will perform this change behind the scenes: myVariable += 1.
•If an error is encountered, FreeFlyer will exit the Try block and execute any remaining commands in the Mission Plan.
•Errors fall into the category of recoverable errors and unrecoverable errors which have different behaviors in a Try block.
oRecoverable errors are those where all affected objects can be returned to an expected, earlier state. These are caught by the Try command and will be reported to Diagnostics.
oUnrecoverable errors are those which leave objects in an undefined or unknown state and from which objects can not be fully returned to expected, earlier states. These errors will continue to result in error messages that stop execution of a FreeFlyer Mission Plan even when they are trapped within a Try block.
oA vast majority of errors in FreeFlyer are recoverable. It is possible that a user could encounter an unrecoverable error, however, that could get through the Try block interface. These should be reported to FreeFlyer technical support if found.
Send error count to
•Diagnostics Properties and Methods