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.
On Sat, Feb 03, 2001 at 01:47:10AM +0300, Alexey Mahotkin wrote:
> >>>>> "BC" == Ben Collins-Sussman <firstname.lastname@example.org> 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
> You could implement it in C using static stack somewhere in warning.c, and
> accessor functions, available in warning.h:
> 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 :)
Greg Stein, http://www.lyra.org/
Received on Sat Oct 21 14:36:21 2006