[nomaster] better error messages for various macro definition errors

backport of 1d3ec4e708154ec05554f540d7d68ed55dc12426
Merge pull request #3232 from xeno-by/topic/macro-error-messages-210x

[nomaster] better error messages for various macro definition errors