more detail error message on car/cdr error

This commit is contained in:
Yuichi Nishiwaki 2014-08-09 17:08:33 +09:00
parent bd98dda5d0
commit 57d3618c5a
1 changed files with 2 additions and 2 deletions

View File

@ -25,7 +25,7 @@ pic_car(pic_state *pic, pic_value obj)
struct pic_pair *pair;
if (! pic_pair_p(obj)) {
pic_error(pic, "pair required");
pic_errorf(pic, "pair required, but got ~s", obj);
}
pair = pic_pair_ptr(obj);
@ -38,7 +38,7 @@ pic_cdr(pic_state *pic, pic_value obj)
struct pic_pair *pair;
if (! pic_pair_p(obj)) {
pic_error(pic, "pair required");
pic_errorf(pic, "pair required, but got ~s", obj);
}
pair = pic_pair_ptr(obj);