Ahhh... I'm not good on macros...
As posted, you've got a missing "'" in string, and a mismatched else... Fixing those, it seems to act more-or-less as expected. Don't expect too much - %ifnum, for example, doesn't recognize "-1" as a number (use "0-1", if you need it).
You should be able to get preprocess-only output from "-e" - weirdly, the errors go to stderr, the rest to stdout, so you may need to do it twice to see it all. I'm not sure it'll help.
It *might* help figure out what's going on if you use something like "mov eax, 'str'"/"mov eax, 'id'"... instead of the "%error" mechanism...
Best,
Frank