better error messages for various macro definition errors