REV: extract error messages to a macro