I tried to resolve the issue by trying to figure out the syntax for the SET_DECODE_ERROR macro.
I tried to call a function from the macro, and eventually do the checking in that function.
Second way I tried was to replace statement for macro instead of using do-while for placing the if-else clause.
I was stuck at the issue that at the point when the compiler tries to replace the macro with actual code, `pymain` wasn't defined.
If someone could provide a pointer on this, it would be really helpful and I'll try to work on a patch.
One simplest possible solution would be not use macro and simply use the code at the 3 places where it is being used. But I'll defer this anti-DRY approach if we can have a better solution.