Errors are nice to report

This commit is contained in:
XANTRONIX Development 2019-06-28 18:09:08 -05:00
parent 130b29605c
commit b7c3bcd81f

View file

@ -99,14 +99,26 @@ int main(int argc, char **argv) {
} }
if ((can_if = hexagram_can_if_open(argv[1])) == NULL) { if ((can_if = hexagram_can_if_open(argv[1])) == NULL) {
perror("hexagram_can_if_open()");
return 1; return 1;
} }
if ((window = hexagram_window_new_x11(NULL, width, height)) == NULL) { if ((window = hexagram_window_new_x11(NULL, width, height)) == NULL) {
perror("hexagram_window_new_x11()");
return 1; return 1;
} }
if ((cluster = hexagram_cluster_new(width, height)) == NULL) { 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; return 1;
} }