Re: [cairo] Re: cairo c++ bindings



[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 murrayc com
www.murrayc.com
www.openismus.com




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]