diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2012-01-26 15:39:12 -0800 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2012-01-26 15:39:12 -0800 |
commit | 9fc7ba486d0a17cb4503319f0bb2c675f96ea0c1 (patch) | |
tree | 399dd875581b50261d6984443f791c6ca79193a0 | |
parent | ef2f7205bc38429b41bcb3b33db7ea2ca464e0c3 (diff) | |
download | txr-9fc7ba486d0a17cb4503319f0bb2c675f96ea0c1.tar.gz txr-9fc7ba486d0a17cb4503319f0bb2c675f96ea0c1.tar.bz2 txr-9fc7ba486d0a17cb4503319f0bb2c675f96ea0c1.zip |
* lib.c (cat_str): Throw error if one of the list elements
is not a character or string instead of silently returning nil.
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | lib.c | 3 |
2 files changed, 7 insertions, 1 deletions
@@ -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> @@ -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); |