Enum Error
- Namespace
- Godot
- Assembly
- GodotSharp.dll
public enum Error : long
Fields
AlreadyExists = 32Already exists error.
AlreadyInUse = 22Already in use error.
Bug = 47Bug 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 = 44Busy error.
CantAcquireResource = 28Can't acquire resource error.
CantConnect = 25Can't connect error.
CantCreate = 20Can't create error.
CantFork = 29Can't fork process error.
CantOpen = 19Can't open error.
CantResolve = 26Can't resolve error.
CompilationFailed = 36Compilation failed error.
ConnectionError = 27Connection error.
CyclicLink = 40Cycling link (import cycle) error.
DatabaseCantRead = 34Database: Read error.
DatabaseCantWrite = 35Database: Write error.
DoesNotExist = 33Does not exist error.
DuplicateSymbol = 42Duplicate symbol error.
Failed = 1Generic error.
FileAlreadyInUse = 11File: Already in use error.
FileBadDrive = 8File: Bad drive error.
FileBadPath = 9File: Bad path error.
FileCantOpen = 12File: Can't open error.
FileCantRead = 14File: Can't read error.
FileCantWrite = 13File: Can't write error.
FileCorrupt = 16File: Corrupt error.
FileEof = 18File: End of file (EOF) error.
FileMissingDependencies = 17File: Missing dependencies error.
FileNoPermission = 10File: No permission error.
FileNotFound = 7File: Not found error.
FileUnrecognized = 15File: Unrecognized error.
Help = 46Help error. Used internally when passing
--versionor--helpas executable options.InvalidData = 30Invalid data error.
InvalidDeclaration = 41Invalid declaration error.
InvalidParameter = 31Invalid parameter error.
LinkFailed = 38Linking failed error.
Locked = 23Locked error.
MethodNotFound = 37Method not found error.
Ok = 0Methods 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.
Example:
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 = 6Out of memory (OOM) error.
ParameterRangeError = 5Parameter range error.
ParseError = 43Parse error.
PrinterOnFire = 48Printer on fire error (This is an easter egg, no built-in methods return this error code).
QueryFailed = 21Query failed error.
ScriptFailed = 39Script failed error.
Skip = 45Skip error.
Timeout = 24Timeout error.
Unauthorized error.
Unavailable error.
Unconfigured = 3Unconfigured error.