diff options
author | David Robillard <d@drobilla.net> | 2020-10-15 08:57:35 +0200 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2020-10-16 18:22:59 +0200 |
commit | 418a24f8875135c7fb6669fe1eee3887097c93d8 (patch) | |
tree | 3c51abd65dcd96434726bd2b6e0bab5ffbe75c28 | |
parent | d10bd6ccf92b3fa1726a93dd7f692d03d265782e (diff) | |
download | pugl-418a24f8875135c7fb6669fe1eee3887097c93d8.tar.gz pugl-418a24f8875135c7fb6669fe1eee3887097c93d8.tar.bz2 pugl-418a24f8875135c7fb6669fe1eee3887097c93d8.zip |
Show errors in example programs consistently
-rw-r--r-- | examples/pugl_print_events.c | 5 |
1 files changed, 3 insertions, 2 deletions
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); |