OpenImageIO/oiio — pull request #407 by lgritz (2012-07-17 19:37:55+00:00)
Title: Review: ImageBuf error reporting beef-up

Per review comments from Jeremy, here I've added a public error() function to ImageBuf so that apps can add errors to ImageBuf objects.

Hereby we adopt the convention that ImageBufAlgo functions bubble up error messages by attaching them to their "Result" IB (in addition to returning 'false').

Prototyped this idiom for IBA::render_text and "oiiotool --text". As an example:

$ oiiotool --create 640x480 3 -text:font=lg "Hi" -o out.tif
ERROR: -text:font=lg (Could not set font face to "lg")

If you guys like this, I will amend the pull request with such error reporting for the rest of the IBA/oiiotool functions.