Enum Error
- Namespace
- Godot
- Assembly
- GodotSharp.dll
public enum Error : long
Fields
AlreadyExists = 32
Already exists error.
AlreadyInUse = 22
Already in use error.
Bug = 47
Bug error, caused by an implementation issue in the method.
Note: If a built-in method returns this code, please open an issue on the GitHub Issue Tracker.
Busy = 44
Busy error.
CantAcquireResource = 28
Can't acquire resource error.
CantConnect = 25
Can't connect error.
CantCreate = 20
Can't create error.
CantFork = 29
Can't fork process error.
CantOpen = 19
Can't open error.
CantResolve = 26
Can't resolve error.
CompilationFailed = 36
Compilation failed error.
ConnectionError = 27
Connection error.
CyclicLink = 40
Cycling link (import cycle) error.
DatabaseCantRead = 34
Database: Read error.
DatabaseCantWrite = 35
Database: Write error.
DoesNotExist = 33
Does not exist error.
DuplicateSymbol = 42
Duplicate symbol error.
Failed = 1
Generic error.
FileAlreadyInUse = 11
File: Already in use error.
FileBadDrive = 8
File: Bad drive error.
FileBadPath = 9
File: Bad path error.
FileCantOpen = 12
File: Can't open error.
FileCantRead = 14
File: Can't read error.
FileCantWrite = 13
File: Can't write error.
FileCorrupt = 16
File: Corrupt error.
FileEof = 18
File: End of file (EOF) error.
FileMissingDependencies = 17
File: Missing dependencies error.
FileNoPermission = 10
File: No permission error.
FileNotFound = 7
File: Not found error.
FileUnrecognized = 15
File: Unrecognized error.
Help = 46
Help error. Used internally when passing
--version
or--help
as executable options.InvalidData = 30
Invalid data error.
InvalidDeclaration = 41
Invalid declaration error.
InvalidParameter = 31
Invalid parameter error.
LinkFailed = 38
Linking failed error.
Locked = 23
Locked error.
MethodNotFound = 37
Method not found error.
Ok = 0
Methods that return Error return Ok when no error occurred.
Since Ok has value
0
, and all other error constants are positive integers, it can also be used in boolean checks.var error = method_that_returns_error() if error != OK: printerr("Failure!")
Or, alternatively:
if error: printerr("Still failing!")
Note: Many functions do not return an error code, but will print error messages to standard output.
OutOfMemory = 6
Out of memory (OOM) error.
ParameterRangeError = 5
Parameter range error.
ParseError = 43
Parse error.
PrinterOnFire = 48
Printer on fire error (This is an easter egg, no built-in methods return this error code).
QueryFailed = 21
Query failed error.
ScriptFailed = 39
Script failed error.
Skip = 45
Skip error.
Timeout = 24
Timeout error.
Unauthorized error.
Unavailable error.
Unconfigured = 3
Unconfigured error.