Fixes error reporting in go generator