parameters: (self, body)
return_statement: return c
docstring: Generates an error message pertaining to population failure.
  
      E.g 'expected bool, got int'
docstring_summary: Generates an error message pertaining to population failure.
docstring_tokens: Generates an error message pertaining to population failure .
function: def _GenerateError(self, body):
      """Generates an error message pertaining to population failure.
  
      E.g 'expected bool, got int'
      """
      c = Code()
      if not self._generate_error_messages:
        return c
      (c.Append('if (error->length())')
        .Append('  error->append(UTF8ToUTF16("; "));')
        .Append('error->append(UTF8ToUTF16(%s));' % body))
      return c
function_tokens: def _GenerateError ( self , body ) : c = Code ( ) if not self . _generate_error_messages : return c ( c . Append ( 'if (error->length())' ) . Append ( '  error->append(UTF8ToUTF16("; "));' ) . Append ( 'error->append(UTF8ToUTF16(%s));' % body ) ) return c