Rewrite macros to allow redirection of errors.

This allows a fake reporter to be injected and log all the errors.
Doing this mean we can test our macros.