aboutsummaryrefslogtreecommitdiff
path: root/src/stdlib
diff options
context:
space:
mode:
Diffstat (limited to 'src/stdlib')
-rw-r--r--src/stdlib/lists.h2
-rw-r--r--src/stdlib/util.h2
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; \
})