diff options
| author | Marek Chalupa <mchqwerty@gmail.com> | 2014-06-20 09:29:52 +0200 |
|---|---|---|
| committer | Pekka Paalanen <pq@iki.fi> | 2014-07-07 17:13:21 +0300 |
| commit | 886b09c9a3a9d8672039f09fe7eaf3f2b2b012ca (patch) | |
| tree | 59a1bd3eae6a2feeda3bad99f78b3be1ac529c84 /src/wayland-client.h | |
| parent | configure: fix publican version detection (diff) | |
| download | wayland-886b09c9a3a9d8672039f09fe7eaf3f2b2b012ca.tar wayland-886b09c9a3a9d8672039f09fe7eaf3f2b2b012ca.tar.gz wayland-886b09c9a3a9d8672039f09fe7eaf3f2b2b012ca.tar.bz2 wayland-886b09c9a3a9d8672039f09fe7eaf3f2b2b012ca.tar.lz wayland-886b09c9a3a9d8672039f09fe7eaf3f2b2b012ca.tar.xz wayland-886b09c9a3a9d8672039f09fe7eaf3f2b2b012ca.tar.zst wayland-886b09c9a3a9d8672039f09fe7eaf3f2b2b012ca.zip | |
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>
Diffstat (limited to 'src/wayland-client.h')
| -rw-r--r-- | src/wayland-client.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/wayland-client.h b/src/wayland-client.h index 2a32785..dc4df53 100644 --- a/src/wayland-client.h +++ b/src/wayland-client.h @@ -161,6 +161,9 @@ int wl_display_dispatch_queue_pending(struct wl_display *display, struct wl_event_queue *queue); int wl_display_dispatch_pending(struct wl_display *display); int wl_display_get_error(struct wl_display *display); +uint32_t wl_display_get_protocol_error(struct wl_display *display, + const struct wl_interface **interface, + uint32_t *id); int wl_display_flush(struct wl_display *display); int wl_display_roundtrip(struct wl_display *display); |
