Improve the appearance of a few error messages (#1187).