• D
    Reporting cleanup for GPDB specific errors/messages · 56540f11
    Daniel Gustafsson 提交于
    The Greenplum specific error handling via ereport()/elog() calls was
    in need of a unification effort as some parts of the code was using a
    different messaging style to others (and to upstream). This aims at
    bringing many of the GPDB error calls in line with the upstream error
    message writing guidelines and thus make the user experience of
    Greenplum more consistent.
    
    The main contributions of this patch are:
    
    * errmsg() messages shall start with a lowercase letter, and not end
      with a period. errhint() and errdetail() shall be complete sentences
      starting with capital letter and ending with a period. This attempts
      to fix this on as many ereport() calls as possible, with too detailed
      errmsg() content broken up into details and hints where possible.
    
    * Reindent ereport() calls to be more consistent with the common style
      used in upstream and most parts of Greenplum:
    
    	ereport(ERROR,
    			(errcode(<CODE>),
    			 errmsg("short message describing error"),
    			 errhint("Longer message as a complete sentence.")));
    
    * Avoid breaking messages due to long lines since it makes grepping
      for error messages harder when debugging. This is also the de facto
      standard in upstream code.
    
    * Convert a few internal error ereport() calls to elog(). There are
      no doubt more that can be converted, but the low hanging fruit has
      been dealt with. Also convert a few elog() calls which are user
      facing to ereport().
    
    * Update the testfiles to match the new messages.
    
    Spelling and wording is mostly left for a follow-up commit, as this was
    getting big enough as it was. The most obvious cases have been handled
    but there is work left to be done here.
    
    Discussion: https://github.com/greenplum-db/gpdb/pull/6378Reviewed-by: NAshwin Agrawal <aagrawal@pivotal.io>
    Reviewed-by: NHeikki Linnakangas <hlinnakangas@pivotal.io>
    56540f11
copy.c 205.4 KB