tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: libcodecs(3), take 4

Am 21.10.2010 um 15:14 schrieb Masao Uebayashi <>:

> On Thu, Oct 21, 2010 at 02:54:20PM +0200, Marc Balmer wrote:
>> Al,
>>> On Sat, Oct 02, 2010 at 02:42:02PM +0900, Masao Uebayashi wrote:
>>>> Usually libraries don't print error messages to stderr, nor exit.
>>> That's true for some libraries, but not for all of them.  At the same
>>> time, printing error messages is far superior to the practise of
>>> returning enumerated error values (like regexp libraries), or stacking
>>> them up and vomiting them up at a later stage.
>> libraries that do things like writing to stderr or even exit the callers
>> program are a pest.  I really dislike this part of the design.  As an
>> application programmer, I would like to be in control how to react to an
>> error and not have the library to make assumptions on what is the right
>> way to deal with a certain situation.
> Forget the exit part - that was my mistake.  (I saw many "if (error)
> return 1;" in the code, that made me confused, and somehow transformed
> to "exit(1);" in my head.)

Oh, sorry then. Well, so stays the stderr thingie, but that is much less of a 
problem ;)

> Masao
>> - Marc
> -- 
> Masao Uebayashi / Tombi Inc. / Tel: +81-90-9141-4635

Home | Main Index | Thread Index | Old Index