mirror of
https://github.com/justinethier/cyclone.git
synced 2025-07-12 23:37:38 +02:00
Include function name in args error
This commit is contained in:
parent
acfd8c53c5
commit
7caa67a51c
2 changed files with 4 additions and 3 deletions
|
@ -14,7 +14,8 @@
|
||||||
object l = Cyc_length(data, args); \
|
object l = Cyc_length(data, args); \
|
||||||
if (num_args > obj_obj2int(l)) { \
|
if (num_args > obj_obj2int(l)) { \
|
||||||
char buf[128]; \
|
char buf[128]; \
|
||||||
snprintf(buf, 127, "Expected %d arguments but received %ld.", num_args, obj_obj2int(l)); \
|
snprintf(buf, 127, "Expected %d arguments to %s but received %ld.", \
|
||||||
|
num_args, fnc_name, obj_obj2int(l)); \
|
||||||
Cyc_rt_raise_msg(data, buf); \
|
Cyc_rt_raise_msg(data, buf); \
|
||||||
} \
|
} \
|
||||||
}
|
}
|
||||||
|
|
|
@ -2711,7 +2711,7 @@ void _length(void *data, object cont, object args)
|
||||||
|
|
||||||
void _bytevector_91length(void *data, object cont, object args)
|
void _bytevector_91length(void *data, object cont, object args)
|
||||||
{
|
{
|
||||||
Cyc_check_num_args(data, "bytevector_91length", 1, args);
|
Cyc_check_num_args(data, "bytevector-length", 1, args);
|
||||||
{
|
{
|
||||||
object obj = Cyc_bytevector_length(data, car(args));
|
object obj = Cyc_bytevector_length(data, car(args));
|
||||||
return_closcall1(data, cont, obj);
|
return_closcall1(data, cont, obj);
|
||||||
|
@ -2770,7 +2770,7 @@ void _Cyc_91utf8_91_125string(void *data, object cont, object args)
|
||||||
|
|
||||||
void _vector_91length(void *data, object cont, object args)
|
void _vector_91length(void *data, object cont, object args)
|
||||||
{
|
{
|
||||||
Cyc_check_num_args(data, "vector_91length", 1, args);
|
Cyc_check_num_args(data, "vector-length", 1, args);
|
||||||
{
|
{
|
||||||
object obj = Cyc_vector_length(data, car(args));
|
object obj = Cyc_vector_length(data, car(args));
|
||||||
return_closcall1(data, cont, obj);
|
return_closcall1(data, cont, obj);
|
||||||
|
|
Loading…
Add table
Reference in a new issue