Error analysis is a basic and important task for mathematics teachers. Unfortunately, in the present literature there is a lack of detailed understanding about teacher knowledge as used in it. Based on a synthesis of the literature in error analysis, a framework for prescribing and assessing mathematics teacher knowledge in error analysis was formulated. The major constructs incorporated in this framework were the nature of mathematical error and the phrase of error analysis. The framework was validated through analysis of teachers' documents by two empirical examples.