aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCraig Barnes <craigbarnes@protonmail.com>2021-02-09 15:16:19 +0000
committerCraig Barnes <craigbarnes@protonmail.com>2021-02-09 15:16:19 +0000
commit2f81a1d07c3828391bf1b5656a9143aaf3822089 (patch)
tree8ff4cb907b0ecab598bfc4918016de35523981ec
parentConvert some uses of xassert(false) to BUG("some error message") (diff)
Convert some more uses of xassert(false) to BUG("...")
-rw-r--r--input.c4
-rw-r--r--render.c2
-rw-r--r--search.c4
3 files changed, 5 insertions, 5 deletions
diff --git a/input.c b/input.c
index ad3934b6..944f1336 100644
--- a/input.c
+++ b/input.c
@@ -325,7 +325,7 @@ execute_binding(struct seat *seat, struct terminal *term,
return true;
case BIND_ACTION_COUNT:
- xassert(false);
+ BUG("Invalid action type");
return false;
}
@@ -1150,7 +1150,7 @@ xcursor_for_csd_border(struct terminal *term, int x, int y)
else if (term->active_surface == TERM_SURF_BORDER_TOP) return XCURSOR_TOP_SIDE;
else if (term->active_surface == TERM_SURF_BORDER_BOTTOM) return XCURSOR_BOTTOM_SIDE;
else {
- xassert(false);
+ BUG("Unreachable");
return NULL;
}
}
diff --git a/render.c b/render.c
index 99869c2c..8cf7f29a 100644
--- a/render.c
+++ b/render.c
@@ -1669,7 +1669,7 @@ render_csd_button(struct terminal *term, enum csd_surface surf_idx)
break;
default:
- xassert(false);
+ BUG("unhandled surface type: %u", (unsigned)surf_idx);
break;
}
diff --git a/search.c b/search.c
index 4fde8a92..d7939219 100644
--- a/search.c
+++ b/search.c
@@ -785,11 +785,11 @@ execute_binding(struct seat *seat, struct terminal *term,
return true;
case BIND_ACTION_SEARCH_COUNT:
- xassert(false);
+ BUG("Invalid action type");
return true;
}
- xassert(false);
+ BUG("Unhandled action type");
return false;
}