summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHugo Locurcio <hugo.locurcio@hugo.pro>2020-09-23 23:24:58 +0200
committerHugo Locurcio <hugo.locurcio@hugo.pro>2020-09-24 14:23:53 +0200
commit50f3a8e312d5449771ff12843471731996c0f2d6 (patch)
treeb8ab28fc80349f4f2ac744353f56f153a6b642d9
parent72aaf81518253e25f28b3a23b5d3509e1264a5ad (diff)
Improve documentation related to printing error/warning messages
-rw-r--r--modules/gdscript/doc_classes/@GDScript.xml2
1 files changed, 2 insertions, 0 deletions
diff --git a/modules/gdscript/doc_classes/@GDScript.xml b/modules/gdscript/doc_classes/@GDScript.xml
index 918581bc9b..613039754f 100644
--- a/modules/gdscript/doc_classes/@GDScript.xml
+++ b/modules/gdscript/doc_classes/@GDScript.xml
@@ -818,6 +818,7 @@
a = [1, 2, 3]
print("a", "b", a) # Prints ab[1, 2, 3]
[/codeblock]
+ [b]Note:[/b] Consider using [method push_error] and [method push_warning] to print error and warning messages instead of [method print]. This distinguishes them from print messages used for debugging purposes, while also displaying a stack trace when an error or warning is printed.
</description>
</method>
<method name="print_debug" qualifiers="vararg">
@@ -891,6 +892,7 @@
[codeblock]
push_error("test error") # Prints "test error" to debugger and terminal as error call
[/codeblock]
+ [b]Note:[/b] Errors printed this way will not pause project execution. To print an error message and pause project execution in debug builds, use [code]assert(false, "test error")[/code] instead.
</description>
</method>
<method name="push_warning">