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



The way the stl does it (I am not saying this is the right way by any
means) in the iostreams is that you set flags on what should throw an
error and what should not (std::ios::badbit, std::ios::failbit, etc.),
and the objects have a method that queries the currently set flags (so
you can ask if the last operation failed or if the object is in an eof
state and so-on).  In a way, this would mimic cairo's current
semantics because you could still perform operations even if the
object was in a bad state.

The way this is implemented is super annoying with the msvc++ system
because the exceptions tell why they were thrown (i.e. "badbit set" )
but now really why ("no read permissions on file X), so they are
really no better than checking if the failbit or badbit is set on the
object after the operation.



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