[Xcb] XCB error handling; my penultimate proposal

Barton C Massey bart at cs.pdx.edu
Mon Dec 19 18:07:46 PST 2005


In message <20051219225159.GP7478 at id.minilop.net> you wrote:
> >     (b) Occasionally, I'll make a request that I know might
> >         fail, and want to handle the expected failure or
> >         shutdown otherwise.  For example, I might choose to
> >         try to read a property off the display knowing it
> >         might not be there.  In this case, it is quite
> >         convenient to be able to ask to see any error that
> >         is returned for the request.
> 
> In that example you probably don't care what error occurred, and just
> want to know whether you successfully got the value of the property and
> not call your usual error handler. Gdk on X does this *a lot*.

I think I do care what error occurred.  If I get some random
error back, rather than the one I expected, I want to exit
gracefully.  I only want to handle the error I was
expecting.

A good example of this is xcbrandr, which gets back a lot of
"not supported" errors for requests to do things like rotate
the display.  I want to exit if the error detail I get back
is other than 3, else report the problem some special way.

    Bart


More information about the Xcb mailing list