Skip to content

Commit

Permalink
Make "cannot invoke" errors consistent.
Browse files Browse the repository at this point in the history
  • Loading branch information
jnthn committed Oct 12, 2014
1 parent 47bf1c7 commit 23c6826
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/6model/6model.c
Expand Up @@ -385,7 +385,7 @@ MVMint64 MVM_6model_try_cache_type_check(MVMThreadContext *tc, MVMObject *obj, M

/* Default invoke function on STables; for non-invokable objects */
void MVM_6model_invoke_default(MVMThreadContext *tc, MVMObject *invokee, MVMCallsite *callsite, MVMRegister *args) {
MVM_exception_throw_adhoc(tc, "non-invokable object is non-invokable");
MVM_exception_throw_adhoc(tc, "Cannot invoke this object (REPR: %s)", REPR(invokee)->name);
}

/* Clean up STable memory. */
Expand Down
4 changes: 2 additions & 2 deletions src/core/frame.c
Expand Up @@ -1456,8 +1456,8 @@ MVMObject * MVM_frame_find_invokee(MVMThreadContext *tc, MVMObject *code, MVMCal
if (STABLE(code)->invoke == MVM_6model_invoke_default) {
MVMInvocationSpec *is = STABLE(code)->invocation_spec;
if (!is) {
MVM_exception_throw_adhoc(tc, "Cannot invoke this object (REPR: %s, cs = %d)",
REPR(code)->name, STABLE(code)->container_spec ? 1 : 0);
MVM_exception_throw_adhoc(tc, "Cannot invoke this object (REPR: %s)",
REPR(code)->name);
}
code = find_invokee_internal(tc, code, tweak_cs, is);
}
Expand Down

0 comments on commit 23c6826

Please sign in to comment.