From 418a24f8875135c7fb6669fe1eee3887097c93d8 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Thu, 15 Oct 2020 08:57:35 +0200 Subject: Show errors in example programs consistently --- examples/pugl_print_events.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'examples') diff --git a/examples/pugl_print_events.c b/examples/pugl_print_events.c index 08a4a86..3a5f6a7 100644 --- a/examples/pugl_print_events.c +++ b/examples/pugl_print_events.c @@ -63,8 +63,9 @@ main(void) puglSetHandle(app.view, &app); puglSetEventFunc(app.view, onEvent); - if (puglRealize(app.view)) { - return logError("Failed to create window\n"); + PuglStatus st = puglRealize(app.view); + if (st) { + return logError("Failed to create window (%s)\n", puglStrerror(st)); } puglShowWindow(app.view); -- cgit v1.2.1