diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2025-12-28 16:52:30 -0500 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2025-12-28 16:52:30 -0500 |
| commit | 273ef13fe728e3722f76098178f78508fb439b36 (patch) | |
| tree | aea24cc13bab155466028b222b92af7473d47e23 /src/stdlib | |
| parent | f6b140681d21a6cb631e0ea5733d82a53ef97d25 (diff) | |
Fix some calls to fail()
Diffstat (limited to 'src/stdlib')
| -rw-r--r-- | src/stdlib/lists.h | 2 | ||||
| -rw-r--r-- | src/stdlib/util.h | 2 |
2 files changed, 2 insertions, 2 deletions
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; \ }) |
