fix error reporting in macro.rb