more proper error message
This commit is contained in:
parent
7edcccdf82
commit
e89d59c606
@ -661,7 +661,7 @@ void genObj(B o, B c, bool anyMut, void* ptr) { // doesn't consume
|
|||||||
B e = t->a[0].o;
|
B e = t->a[0].o;
|
||||||
if (!isArr(c)) {
|
if (!isArr(c)) {
|
||||||
if (isC32(e)) thrF("FFI: Expected array corresponding to \"*%S\"", sty_names[o2cG(e)]);
|
if (isC32(e)) thrF("FFI: Expected array corresponding to \"*%S\"", sty_names[o2cG(e)]);
|
||||||
else thrM("FFI: Expected array corresponding to *{...}");
|
else thrM("FFI: Expected array corresponding to *...");
|
||||||
}
|
}
|
||||||
usz ia = IA(c);
|
usz ia = IA(c);
|
||||||
if (t->ty==cty_tlarr && t->arrCount!=ia) thrF("FFI: Incorrect item count of %s corresponding to \"[%s]...\"", ia, (usz)t->arrCount);
|
if (t->ty==cty_tlarr && t->arrCount!=ia) thrF("FFI: Incorrect item count of %s corresponding to \"[%s]...\"", ia, (usz)t->arrCount);
|
||||||
|
|||||||
@ -130,7 +130,8 @@
|
|||||||
|
|
||||||
|
|
||||||
# wrong argument internal structure
|
# wrong argument internal structure
|
||||||
!"FFI: Expected array corresponding to *{...}" % f←@•FFI""‿"bqn_init"‿">*{i32}" ⋄ F @
|
!"FFI: Expected array corresponding to *..." % f←@•FFI""‿"bqn_init"‿">*[2]i32" ⋄ F @
|
||||||
|
!"FFI: Expected array corresponding to *..." % f←@•FFI""‿"bqn_init"‿">*{i32}" ⋄ F @
|
||||||
!"FFI: Expected array corresponding to a struct" % f←@•FFI""‿"bqn_init"‿">{i32}" ⋄ F @
|
!"FFI: Expected array corresponding to a struct" % f←@•FFI""‿"bqn_init"‿">{i32}" ⋄ F @
|
||||||
!"FFI: Expected array corresponding to a struct" % f←@•FFI""‿"bqn_init"‿">*{i32}" ⋄ F ⟨@⟩
|
!"FFI: Expected array corresponding to a struct" % f←@•FFI""‿"bqn_init"‿">*{i32}" ⋄ F ⟨@⟩
|
||||||
!"FFI: Incorrect list length corresponding to a struct: expected 1, got 0" % f←@•FFI""‿"bqn_init"‿">*{i32}" ⋄ F ⟨⟨⟩⟩
|
!"FFI: Incorrect list length corresponding to a struct: expected 1, got 0" % f←@•FFI""‿"bqn_init"‿">*{i32}" ⋄ F ⟨⟨⟩⟩
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user