The present invention is a system and method for providing a software
recovery mechanism. In architecture, the system includes a compiler that
parses a source program. Error condition test logic detects if an error
condition test exists in the source program, and determination logic
determines if error recovery is enabled when the error condition test is
detected. Error recovery flag generation logic generates an error recovery
flag code when the error condition test is detected and the error recovery
is enabled, and error recovery code is inserted in computer program if
error recovery is enabled. The method includes the steps of parsing a
source program, and detecting if an error condition test exists in the
source program. If an error condition test is detected, determining if
error recovery is enabled. An error recovery flag code is created when the
error condition test exists and the error recovery is enabled. Error
recovery code is inserted into the computer program if error recovery is
enabled.