LuaError
Description
A LuaError represents an error that happened in Lua.
Info
Most functions in this addon return either a LuaError or null.
Tip
You may return a LuaError object from a GDScript function, called from Lua, in order to cause an error in Lua.
Enumerations
ErrorType
Name | Value | Description |
---|---|---|
ERR_TYPE | 1 | Invalid type error. For example, passing a string when an int was expected. |
ERR_RUNTIME | 2 | Lua runtime error. |
ERR_SYNTAX | 3 | Lua syntax error. |
ERR_MEMORY | 4 | Lua ran out of memory. |
ERR_ERR | 5 | Error while handling another error. |
ERR_FILE | 6 | Error while opening or reading a file. |
Properties
message String
A string containing the error message.
type ErrorType
An enum representing the type of the error.
Methods
new_error LuaError
Static function that acts as a constructor for new instances of the LuaError class.
Parameters
Parameters | Description |
---|---|
message: String |
The error message. |
type: ErrorType |
An enum representing the type of this error. |
Returns
LuaError