Read error at the beginning of error().  Fixes #8245.