declare error variable.

missed declaration of error