Control strategies for error handling in a knowledge-based system for image processing and recognition