From b7c3bcd81fe27f6c2b7269d0c820cce53c61bdbb Mon Sep 17 00:00:00 2001 From: XANTRONIX Development Date: Fri, 28 Jun 2019 18:09:08 -0500 Subject: [PATCH] Errors are nice to report --- examples/cluster.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/examples/cluster.c b/examples/cluster.c index 4d6d98c..d80f11a 100644 --- a/examples/cluster.c +++ b/examples/cluster.c @@ -99,14 +99,26 @@ int main(int argc, char **argv) { } if ((can_if = hexagram_can_if_open(argv[1])) == NULL) { + perror("hexagram_can_if_open()"); + return 1; } if ((window = hexagram_window_new_x11(NULL, width, height)) == NULL) { + perror("hexagram_window_new_x11()"); + return 1; } if ((cluster = hexagram_cluster_new(width, height)) == NULL) { + perror("hexagram_cluster_new()"); + + return 1; + } + + if (hexagram_cluster_filter_can_if(can_if) < 0) { + perror("hexagram_cluster_filter_can_if()"); + return 1; }