You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-13 13:31:48 +00:00
Print a warning message if OS.exit_code is set to a non-portable value
This also improves the related documentation.
This commit is contained in:
@@ -686,6 +686,10 @@ int _OS::get_exit_code() const {
|
||||
|
||||
void _OS::set_exit_code(int p_code) {
|
||||
|
||||
if (p_code < 0 || p_code > 125) {
|
||||
WARN_PRINT("For portability reasons, the exit code should be set between 0 and 125 (inclusive).");
|
||||
}
|
||||
|
||||
OS::get_singleton()->set_exit_code(p_code);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user