From 273ef13fe728e3722f76098178f78508fb439b36 Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Sun, 28 Dec 2025 16:52:30 -0500 Subject: Fix some calls to fail() --- src/stdlib/lists.h | 2 +- src/stdlib/util.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src/stdlib') diff --git a/src/stdlib/lists.h b/src/stdlib/lists.h index 12a9e5b5..f6d971f2 100644 --- a/src/stdlib/lists.h +++ b/src/stdlib/lists.h @@ -134,7 +134,7 @@ void *List$random(List_t list, OptionalClosure_t random_int64); #define List$random_value(list, random_int64, t) \ ({ \ List_t _list_expr = list; \ - if (_list_expr.length == 0) fail("Cannot get a random value from an empty list!"); \ + if (_list_expr.length == 0) fail_text(Text("Cannot get a random value from an empty list!")); \ *(t *)List$random(_list_expr, random_int64); \ }) List_t List$sample(List_t list, Int_t n, List_t weights, Closure_t random_num, int64_t padded_item_size); diff --git a/src/stdlib/util.h b/src/stdlib/util.h index 3ab025f4..8341fee5 100644 --- a/src/stdlib/util.h +++ b/src/stdlib/util.h @@ -13,7 +13,7 @@ (strlen(line) >= strlen(suffix) && strcmp(line + strlen(line) - strlen(suffix), suffix) == 0) #define check_initialized(var, init_var, name) \ *({ \ - if (!init_var) fail("The variable " name " is being accessed before it has been initialized!"); \ + if (!init_var) fail_text(Text("The variable " name " is being accessed before it has been initialized!")); \ &var; \ }) -- cgit v1.2.3