On Fri, 2010-12-24, C. Michael Pilato wrote: > On 12/23/2010 07:27 AM, Julian Foad wrote: > >>From IRC: > > > > <Bert> julianf: We changed error codes in libsvn_wc all over the place. > > I don't think we see strict error codes as part of the documented > > behavior, unless it is in the function documentation > > I agree with this. Any time a specific error code is intended for use by an > API function as a specific message to the caller, we document that fact and > that behavior becomes part of the contract. Undocumented error codes are > fair game for changing over time.
OK, then that's fine by me too. Noorul wrote: > Daniel Shahaf wrote: > > Why do you have to place the "svn: " prefix here explicitly? > Normally > > svn_handle_error2() would do that for you. This is a red flag ("is > > a wheel being reinvented here?") for me. > > We are actually consuming the error here to print it and proceed with > the other targets. Noorul, "svn_handle_error2" has a "fatal" flag that controls whether it terminates the program or not; setting fatal=FALSE would enable you to continue processing the other targets. But it prints "the error stack" which is not what you want here - we want just a single error message. Try using "svn_handle_warning2" instead. That function appears to do almost exactly what you want here; the only differences I can see is it inserts "warning: " before the message, which I think is perfect for this usage, and it doesn't print the extra "\n", which is easily rectified. - Julian