def GetErrorOutput(error, new_error=False):
  """Get a output line for an error in regular format."""

  line = ''
  if error.token:
    line = 'Line %d, ' % error.token.line_number

  code = 'E:%04d' % error.code

  error_message = error.message
  if new_error:
    error_message = 'New Error ' + error_message

  return '%s%s: %s' % (line, code, error.message)