[cairo] Re: cairo c++ bindings
themidgard at gmail.com
Thu Nov 24 07:49:34 PST 2005
On 11/24/05, Carl Worth <cworth at cworth.org> wrote:
> No. C coders are not meant to call _get_status repeatedly. What
> happens is that if _get_status would return an error status then
> basically all of that object's functions become NOOPs. That is, it is
> still safe to call functions on that object and defer the _get_status
> error checking until a convenient time.
> If binding to a language that supports exceptions it probably does
> make sense to call _get_status after each call and throw exceptions.
I don't know if anyone else agrees with me, but I think the idea of having
the wrapper be configurable with a policy to handle the errors is highly
The alternative would be to have a bool checkForErrors and check if before
checking and handling errors. This would imply run-time overhead, while
using the policies would not.
What do you think ?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the cairo