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

Issue #1822: suppression of some errors

From: <kfogel_at_collab.net>
Date: 2004-12-03 21:03:08 CET


In r7605, we started doing something very subtle with how we print out
the error messages in a given error chain.

As we walk down an error chain, we always print the error message if
it has a custom message. If it doesn't have a custom message, we must
fall back to svn_strerror or apr_strerror, in which case we print the
appropriate strerror message for that code *only* if this error's code
differs from the error code previous to it in the chain.

The result is that, in a contiguous subchain of errors that all share
the same code, any errors that don't have a custom message, and are
not first in the subchain, will not be printed out at all. Note that
this means an error that falls back to the default message will be
suppressed if it was preceded by an error with a custom message --
that is, the default message never gets printed out at all, no matter
how many of the errors in the chain use it.

As an aside, I believe the comment

    /* Only print the same APR error string once. */

in libsvn_subr/error.c:print_error() is either misplaced or just
wrong. If it belongs anywhere, it belongs in svn_handle_error(),
right above the call to print_error(). I'm mentioning this here first
as a sanity check, before I move it.

The Problem:

See Philip Martin's "Dec 2 15:09:53" comment at the end of


Basically, the current logic is causing users to get an error like

   Error bumping revisions post-commit (details follow):


   Error unlocking locked dirs (details follow):

...but then no details follow! People are understandably annoyed at
this behavior :-).

A Solution:

I believe the best solution is to change the logic to something
equally subtle, but different:

In a given error chain, we should still print out every error that has
a custom message. But for those that have only an error code, we
should make sure that the strerror(code) message gets printed out
exactly once -- once, because that adds information that hasn't
already been printed, but not more than once, because there's no point
saying the same thing twice.

Before I implement this, does anyone have any comments?


To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Fri Dec 3 21:07:50 2004

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.