[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Error message conventions

From: <kfogel_at_collab.net>
Date: 2003-11-24 00:36:49 CET

"Erik Huelsmann" <e.huelsmann@gmx.net> writes:
> The patch below tries to describe the conventions I try to adhere to when
> changing error messages for issue 897; it can also be found at
> http://encorps.dnsalias.com/svn-public/patches/HACKING.patch.

Thanks for writing this up -- much needed!

Comments below. Mostly I agree with your suggested conventions, except
for one:

> + * Don't include newline characters in error messages.

Sometimes it's better, like with checksum mismatch error messages that
compare actual vs expected checksum -- you want the two checksums to
line up vertically. For example this code from reps-strings.c:

    if (! svn_md5_digests_match (checksum, rep->checksum))
      return svn_error_createf
        (SVN_ERR_FS_CORRUPT, NULL,
         "svn_fs__rep_contents: checksum mismatch on rep \"%s\":\n"
         " expected: %s\n"
         " actual: %s\n", rep_key,
         svn_md5_digest_to_cstring (rep->checksum, trail->pool),
         svn_md5_digest_to_cstring (checksum, trail->pool));

So maybe the guideline should be "Try not to" instead of "Don't" ?

-Karl

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Mon Nov 24 01:21:23 2003

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.