summaryrefslogtreecommitdiff
path: root/modules/visual_script/visual_script.cpp
diff options
context:
space:
mode:
authorHugo Locurcio <hugo.locurcio@hugo.pro>2022-05-28 23:11:37 +0200
committerHugo Locurcio <hugo.locurcio@hugo.pro>2022-06-15 16:20:01 +0200
commitcceeb671db82c06ebcd3323065672e11a1613431 (patch)
treee67462e4046ad3d0b7ff115065c2ddbffd6eba7d /modules/visual_script/visual_script.cpp
parent68b86220c806fa02d0d2b21d6561e7ea871e840e (diff)
Improve stack overflow error message in GDScript and VisualScript
Stack overflow errors are generally the result of infinite recursion within a script.
Diffstat (limited to 'modules/visual_script/visual_script.cpp')
-rw-r--r--modules/visual_script/visual_script.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/visual_script/visual_script.cpp b/modules/visual_script/visual_script.cpp
index 30b64d0a7b..c4fafb6676 100644
--- a/modules/visual_script/visual_script.cpp
+++ b/modules/visual_script/visual_script.cpp
@@ -1582,7 +1582,7 @@ Variant VisualScriptInstance::_call_internal(const StringName &p_method, void *p
if (!found) {
r_error.error = Callable::CallError::CALL_ERROR_INVALID_METHOD;
- error_str = RTR("Found sequence bit but not the node in the stack, report bug!");
+ error_str = RTR("Found sequence bit but not the node in the stack (please report).");
error = true;
break;
}
@@ -1594,7 +1594,7 @@ Variant VisualScriptInstance::_call_internal(const StringName &p_method, void *p
// Check for stack overflow.
if (flow_stack_pos + 1 >= flow_max) {
r_error.error = Callable::CallError::CALL_ERROR_INVALID_METHOD;
- error_str = RTR("Stack overflow with stack depth:") + " " + itos(output);
+ error_str = vformat(RTR("Stack overflow (stack size: %s). Check for infinite recursion in your script."), output);
error = true;
break;
}