client: extend error handling
authorMarek Chalupa <mchqwerty@gmail.com>
Fri, 20 Jun 2014 07:29:52 +0000 (09:29 +0200)
committerPekka Paalanen <pq@iki.fi>
Mon, 7 Jul 2014 14:13:21 +0000 (17:13 +0300)
commit886b09c9a3a9d8672039f09fe7eaf3f2b2b012ca
tree59a1bd3eae6a2feeda3bad99f78b3be1ac529c84
parent567977815a8eb73fa22908bb730b6ff395d95a28
client: extend error handling

When an error occurs, wl_display_get_error() does not
provide any way of getting know if it was a local error or if it was
an error event, respectively what object caused the error and what
the error was.

This patch introduces a new function wl_display_get_protocol_error()
which will return error code, interface and id of the object that
generated the error.
wl_display_get_error() will work the same way as before.

wl_display_get_protocol_error() DOES NOT indicate that a non-protocol
error happened. It returns valid information only in that case that
(protocol) error occurred, so it should be used after calling
wl_display_get_error() with positive result.

[Pekka Paalanen] Applied another hunk of Bryce's comments to docs,
added libtool version bump.

Reviewed-by: Pekka Paalanen <ppaalanen@gmail.com>
Reviewed-by: Bryce Harrington <b.harrington@samsung.com>
Makefile.am
src/wayland-client.c
src/wayland-client.h