Thread (24 messages) flat view 24 messages, 3 authors, 2016-07-10

Re: [PATCH] am: ignore return value of write_file()

From: Johannes Schindelin <hidden>
Date: 2016-07-08 06:34:15

Hi René,

On Thu, 7 Jul 2016, René Scharfe wrote:
write_file() either returns 0 or dies, so there is no point in checking
its return value.
The question is whether it makes sense for write_file() to die(). It is a
library function and not every caller can be happy with that function to
exit the program when some file could not be written, without a chance to
tell the user what to do about the situation.

If write_file() was defined in builtin/am.c, as a static function, I would
grudgingly acquiesce, but it is not.

IMO it would be better to fix write_file() to *not* die() but return
error() instead.

Ciao,
Dscho
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help