mirror of
https://github.com/godotengine/godot.git
synced 2025-10-23 09:53:25 +00:00
Made many built-in gdscript functions return more descriptive errors, closes #5150
This commit is contained in:
parent
d5e2b59c84
commit
f860915ae0
3 changed files with 56 additions and 23 deletions
|
@ -727,7 +727,12 @@ Variant GDFunction::call(GDInstance *p_instance, const Variant **p_args, int p_a
|
|||
|
||||
|
||||
String methodstr = GDFunctions::get_func_name(func);
|
||||
err_text=_get_call_error(err,"built-in function '"+methodstr+"'",(const Variant**)argptrs);
|
||||
if (dst->get_type()==Variant::STRING) {
|
||||
//call provided error string
|
||||
err_text="Error calling built-in function '"+methodstr+"': "+String(*dst);
|
||||
} else {
|
||||
err_text=_get_call_error(err,"built-in function '"+methodstr+"'",(const Variant**)argptrs);
|
||||
}
|
||||
break;
|
||||
}
|
||||
ip+=argc+1;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue