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

Re: "svn info" good return code on bad URL

From: Julian Foad <julianfoad_at_btopenworld.com>
Date: 2005-10-11 18:39:59 CEST

Ph. Marek wrote:
>
> Please note that the return code is normally correlated to the system error
> that caused the error, ie.
[...]
> 2 == ENOENT == File not found

No; that approach only works for very low-level tools that don't do much
besides make a few system calls. Most errors in higher-level programs like
Subversion are unrelated to particular system calls.

> I believe that as much information as possible should be returned - so the
> caller can decide what to do.

That approach doesn't scale. Subversion has too many different possible
individual errors to fit in an exit code byte, let alone trying to report
chains of errors. See, for example, the advice on exit codes in The GNU C
Library documentation: <http://www.delorie.com/gnu/docs/glibc/libc_559.html>.

- Julian

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue Oct 11 18:40:58 2005

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.