In industrial applications, the quantity of error recovery codes far exceeds that required for supervisory control. Declarative programming techniques can be integrated with the traditional procedural control to reduce the efforts in developing error recovery codes and to provide flexibility for future modifications as new error types are encountered. A flexible control system that employs reasoning for both control and error recovery should distribute its functions among hierarchical levels. A symbolic level for task level control and error recovery reasoning is composed of a system model, an assembly plan and a reasoning system. A device level includes all the devices and modular control programs. A robotic assembly of a gear plate is presented as an example application of the intelligent error recovery system. The results from two implemented versions of the example application show that incremental revisions to such a system can be made easily and cost effectively but the system requires a relatively large initial declarative programming investment.