>I would like to clean up all the calls to fwrite in the
>extracters/decoders. I was thinking of just writing 'import_write'
>which would attempt the write, and call import_exit if it failed.
>This is what extract_mp3 does, but there are other modules which
>provide more verbose error messages. What is the prefered way of
>handling this?
Personally, I've had my eye on getting rid of import_exit()
entirely, returning an error code from the decode/extract/etc. function
instead. Seeing as that's not done yet, I suppose import_exit() is the
only option, but I'd rather avoid a routine like the import_write() you
suggest that exits on error, and instead have the check and bail at the
point where fwrite() is called; that'll make it easier to go through and
just replace all the import_exit() calls with error returns later.
--Andrew Church
[EMAIL PROTECTED]
http://achurch.org/