summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--lib.c3
2 files changed, 7 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 783aa5a2..acef717f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
2012-01-26 Kaz Kylheku <kaz@kylheku.com>
+ * lib.c (cat_str): Throw error if one of the list elements
+ is not a character or string instead of silently returning nil.
+
+2012-01-26 Kaz Kylheku <kaz@kylheku.com>
+
* txr.1: More discussion of ranges.
2012-01-26 Kaz Kylheku <kaz@kylheku.com>
diff --git a/lib.c b/lib.c
index e71b87cd..29049969 100644
--- a/lib.c
+++ b/lib.c
@@ -1502,7 +1502,8 @@ val cat_str(val list, val sep)
total += len_sep;
continue;
}
- return nil;
+ uw_throwf(error_s, lit("cat_str: ~s is not a character or string"),
+ item, nao);
}
str = (wchar_t *) chk_malloc((total + 1) * sizeof *str);