We define an algebraic specification having a framework for error hand
ling and give an algorithm for automatically appending error descripti
on. Generally, error description in algebraic specification is so comp
licated that it is difficult to comprehend and inconsistencies arise i
f handwritten. Therefore, it is effective to add error description aut
omatically to algebraic specification that has no error description an
d without creating any inconsistency. Error constructors are introduce
d that represent error values as a framework for error handling. When
there exists a term which is not equal to any constructor term, an equ
ation to equalize the term and an error constructor are appended. To a
void inconsistency, i.e., normal value and error value become equal, w
e distinguish three kinds of variables. Some variables can be substitu
ted for only by normal terms, some variables can be replaced only by e
rror terms and some variables can be replaced by any term. Moreover, w
e show correctness of automatic error description addition; i.e., part
itioning of terms in the normal part of sort is preserved before and a
fter error description addition.