[cairo] Re: cairo c++ bindings
Murray Cumming
murrayc at murrayc.com
Thu Nov 24 06:13:20 PST 2005
[snip]
> - Error handling
> In the wrapper i was writting (am writting?, depends on where Cairomm is
> going ;) ) I was considering using policies (like Andrei Alexandrescu did
> in his book Modern C++ Design and his lib : loki ) to specify how I wanted
> cairo errors to be handled.
> I was considering having a policy that would simply ignore the errors (and
> have no overhead). This would allow to take advantage of cairo's behaviour
> when an error is ignored : the operations on an "object" in an error state
> are also ignored.
> The other policy I was considering would (automatically) check for errors
> after calling a function call that might generate them and would throw an
> adequate exception.
At the moment, it throws exceptions when a function returns a bad status.
For functions that don't return a status, maybe it should call
*_get_status() after each call. Is that what the C coders are meant to do?
[snip]
Murray Cumming
murrayc at murrayc.com
www.murrayc.com
www.openismus.com
More information about the cairo
mailing list