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

Re: warnings

From: Greg Stein <gstein_at_lyra.org>
Date: 2001-02-03 11:42:10 CET

That interface implies global variables... IMO that is a non-starter.

I believe warnings are a special case. Most functions will return errors
rather than warnings. For those that *do* return warnings, they can return a
special structure for it.

Cheers,
-g

On Sat, Feb 03, 2001 at 01:47:10AM +0300, Alexey Mahotkin wrote:
> >>>>> "BC" == Ben Collins-Sussman <sussman@newton.collab.net> writes:
>
> BC> How on earth do we build warnings into this existing system? If now we
> BC> say, "ok, we want all svn_* routines to be able to return *both*
> BC> warnings and errors?", what does our exception handling then look like?
> BC> Do all callers then need to check for both warnings and errors
> BC> separately?
>
> IMHO stack of warnings should be made singleton object (as in design
> pattern).
>
> You could implement it in C using static stack somewhere in warning.c, and
> accessor functions, available in warning.h:
>
> init_warnings();
>
> add_warning(msg);
>
> list = get_warnings();
>
>
> This does not require of you to change interface of any function, and will
> be implemented in no more than 100 lines, including extensive copyright
> info :)
>
> --alexm

-- 
Greg Stein, http://www.lyra.org/
Received on Sat Oct 21 14:36:21 2006

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.