mirror of
https://github.com/janet-lang/janet
synced 2024-11-25 01:37:19 +00:00
Add argument to janet_panicf call
This commit is contained in:
parent
79807bf2ab
commit
be0d4c28e4
@ -1493,7 +1493,9 @@ JanetSignal janet_pcall(
|
|||||||
|
|
||||||
Janet janet_mcall(const char *name, int32_t argc, Janet *argv) {
|
Janet janet_mcall(const char *name, int32_t argc, Janet *argv) {
|
||||||
/* At least 1 argument */
|
/* At least 1 argument */
|
||||||
if (argc < 1) janet_panicf("method :%s expected at least 1 argument");
|
if (argc < 1) {
|
||||||
|
janet_panicf("method :%s expected at least 1 argument", name);
|
||||||
|
}
|
||||||
/* Find method */
|
/* Find method */
|
||||||
Janet method = janet_method_lookup(argv[0], name);
|
Janet method = janet_method_lookup(argv[0], name);
|
||||||
if (janet_checktype(method, JANET_NIL)) {
|
if (janet_checktype(method, JANET_NIL)) {
|
||||||
|
Loading…
Reference in New Issue
Block a user