From b5f04656a4b3d1b43a66585ead8ef55536a4fdbc Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sun, 3 Nov 2019 21:13:40 +0100 Subject: Add puglStrerror() and improve test program error reporting --- test/pugl_cairo_test.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'test/pugl_cairo_test.c') diff --git a/test/pugl_cairo_test.c b/test/pugl_cairo_test.c index 1aa291a..1ce9edd 100644 --- a/test/pugl_cairo_test.c +++ b/test/pugl_cairo_test.c @@ -228,7 +228,10 @@ main(int argc, char** argv) puglSetViewHint(view, PUGL_IGNORE_KEY_REPEAT, opts.ignoreKeyRepeat); puglSetEventFunc(view, onEvent); - if (puglCreateWindow(view, "Pugl Test")) { + PuglStatus st = puglCreateWindow(view, "Pugl Test"); + if (st) { + fprintf(stderr, "error: Failed to create window (%s)\n", + puglStrerror(st)); return 1; } -- cgit v1.2.1