Skip to content

Commit

Permalink
Print an error message when a call to Callable::callv() fails
Browse files Browse the repository at this point in the history
Make it similar to `Object::callv()`.
  • Loading branch information
Rindbee committed Nov 13, 2024
1 parent cb411fa commit 8b2ecc9
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions core/variant/callable.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,9 @@ Variant Callable::callv(const Array &p_arguments) const {
CallError ce;
Variant ret;
callp(argptrs, argcount, ret, ce);
if (ce.error != CallError::CALL_OK) {
ERR_FAIL_V_MSG(ret, vformat("Error calling method from 'callv': %s.", Variant::get_call_error_text(get_object(), get_method(), argptrs, argcount, ce)));
}
return ret;
}

Expand Down

0 comments on commit 8b2ecc9

Please sign in to comment.