summaryrefslogtreecommitdiff
path: root/doc/classes
diff options
context:
space:
mode:
authorFabio Alessandrelli <fabio.alessandrelli@gmail.com>2021-12-06 16:34:15 +0100
committerGitHub <noreply@github.com>2021-12-06 16:34:15 +0100
commit3ae8eda1ed30b6c32f6fc1141118c5a062161a96 (patch)
treecd211aeac075967a5c6598cb06345962126008f5 /doc/classes
parente8082003f19ad8d98b6b2f74f64f4eaa7fe86353 (diff)
parent5761b90f3c7d66f5a93aef57e6a21feb807d24bf (diff)
Merge pull request #55603 from Calinou/add-os-crash-method
Add an `OS.crash()` method for testing system crash handler
Diffstat (limited to 'doc/classes')
-rw-r--r--doc/classes/OS.xml9
1 files changed, 8 insertions, 1 deletions
diff --git a/doc/classes/OS.xml b/doc/classes/OS.xml
index 7088844547..a5bd8e2768 100644
--- a/doc/classes/OS.xml
+++ b/doc/classes/OS.xml
@@ -31,6 +31,13 @@
[b]Note:[/b] This method is implemented on Linux, macOS and Windows.
</description>
</method>
+ <method name="crash">
+ <return type="void" />
+ <argument index="0" name="message" type="String" />
+ <description>
+ Crashes the engine (or the editor if called within a [code]@tool[/code] script). This should [i]only[/i] be used for testing the system's crash handler, not for any other purpose. For general error reporting, use (in order of preference) [method @GDScript.assert], [method @GlobalScope.push_error] or [method alert]. See also [method kill].
+ </description>
+ </method>
<method name="create_instance">
<return type="int" />
<argument index="0" name="arguments" type="PackedStringArray" />
@@ -374,7 +381,7 @@
<return type="int" enum="Error" />
<argument index="0" name="pid" type="int" />
<description>
- Kill (terminate) the process identified by the given process ID ([code]pid[/code]), e.g. the one returned by [method execute] in non-blocking mode.
+ Kill (terminate) the process identified by the given process ID ([code]pid[/code]), e.g. the one returned by [method execute] in non-blocking mode. See also [method crash].
[b]Note:[/b] This method can also be used to kill processes that were not spawned by the game.
[b]Note:[/b] This method is implemented on Android, iOS, Linux, macOS and Windows.
</description>