mirror of
https://github.com/justinethier/cyclone.git
synced 2025-05-19 05:39:17 +02:00
Issue #297 - Friendlier error behavior for apply
When apply attempts to execute an object of the wrong type, we now raise a useful error instead of aborting the whole program (!)
This commit is contained in:
parent
19ac6d32aa
commit
99c5bee97a
1 changed files with 3 additions and 3 deletions
|
@ -5314,9 +5314,9 @@ object apply(void *data, object cont, object func, object args)
|
|||
}
|
||||
}
|
||||
|
||||
default:
|
||||
printf("Invalid object type %d\n", type_of(func));
|
||||
exit(1);
|
||||
default: {
|
||||
Cyc_rt_raise2(data, "Call of non-procedure: ", func);
|
||||
}
|
||||
}
|
||||
return NULL; // Never reached
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue