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

svn_cmdline_printf and errors

From: Peter N. Lundblad <peter_at_famlundblad.se>
Date: 2004-05-16 21:46:11 CEST

Hi,

As the new functions svn_cmdline_printf, svn_cmdline_fprintf and
svn_cmdline_fputs are defined, they return an svn_error_t *, but the
implementation never fails. This is because it uses the fuzzy conversion
from UTF-8 if the real one fails, and it doesn't check the return value of
the underlying fputs call.

IN the current code, non of the printf/fprintf/fputs calls check for
errors. Ofcourse this is because if they all output to stdout or stderr
and if that doesn't work, there is not much to do. You can't inform the
user anyway.

We could either:
a) Use SVN_ERR everywhere we call one of the new functions except in
svn_handle_error. Is this overkill?
b) Ditch the return value of the new functions in favour of void and
ignore failures (hoping for SIGPIPE kicking in as we do today).

Opinions?

Regares,
//Peter

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sun May 16 21:38:39 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.