[PATCH 2/5] Added some more information to error messages
spitzak at gmail.com
spitzak at gmail.com
Sun Mar 18 22:56:19 PDT 2012
From: Bill Spitzak <spitzak at lulu.(none)>
---
src/wayland-server.c | 11 ++++++++---
1 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/src/wayland-server.c b/src/wayland-server.c
index 899c094..075ebe8 100644
--- a/src/wayland-server.c
+++ b/src/wayland-server.c
@@ -161,6 +161,9 @@ wl_resource_post_error(struct wl_resource *resource,
vsnprintf(buffer, sizeof buffer, msg, ap);
va_end(ap);
+ if (wl_debug)
+ fprintf(stderr, "%s\n", buffer);
+
client->error = 1;
/*
@@ -212,7 +215,8 @@ wl_client_connection_data(int fd, uint32_t mask, void *data)
if (resource == NULL) {
wl_resource_post_error(client->display_resource,
WL_DISPLAY_ERROR_INVALID_OBJECT,
- "invalid object %d", p[0]);
+ "invalid object %d (method %d, size %d)",
+ p[0], opcode, size);
break;
}
@@ -220,9 +224,10 @@ wl_client_connection_data(int fd, uint32_t mask, void *data)
if (opcode >= object->interface->method_count) {
wl_resource_post_error(client->display_resource,
WL_DISPLAY_ERROR_INVALID_METHOD,
- "invalid method %d, object %s@%d",
+ "invalid method %d (size %d), object %s@%d",
+ opcode, size,
object->interface->name,
- object->id, opcode);
+ object->id);
break;
}
--
1.7.4.1
More information about the wayland-devel
mailing list