Re: [PATCH 03/14] copy_fd: pass error message back through a strbuf
- From
Jonathan Nieder <jrnieder@gmail.com>
- Date
- Dec 3, 2014, 20:28 UTC
- Message-ID
- <20141203202805.GB6527@google.com>
- In-Reply-To
- <xmqqzjb4h823.fsf@gitster.dls.corp.google.com>
Junio C Hamano wrote:
> Jonathan Nieder <jrnieder@gmail.com> writes:
Show 6 quoted lines
>> -extern int copy_fd(int ifd, int ofd); >> +extern int copy_fd(int ifd, int ofd, struct strbuf *err); > > It is not limited to this single function, but what contract do we > envision this "error messages are given back to the caller via > strbuf" convention should give between the callers and the callee?
Good point. I'll add a Documentation/technical/api-error-handling.txt describing die(), error(), warning(), and the strbuf-based method.
Thanks, Jonathan