- Native crash logging functions.
Static variables
Static methods
staticgetBacktrace(handle:CrashHandle):LuaArray<String>
- Read backtrace recorded in a loaded crash dump.
A table is returned containing the addresses of the call stack.
Parameters:
handle | crash dump handle |
|---|
Returns:
backtrace table containing the backtrace
staticgetExtraData(handle:CrashHandle):String
- Read text blob recorded in a crash dump.
The format of read text blob is platform specific and not guaranteed but can be useful for manual inspection.
Parameters:
handle | crash dump handle |
|---|
Returns:
blob string with the platform specific data
staticgetModules(handle:CrashHandle):LuaArray<{name:String, address:String}>
- Get all loaded modules from when the crash occured.
The function returns a table containing entries with sub-tables that have fields 'name' and 'address' set for all loaded modules.
Parameters:
handle | crash dump handle |
|---|
Returns:
modules module table
staticgetSignum(handle:CrashHandle):Int
- Read signal number from a crash report.
Parameters:
handle | crash dump handle |
|---|
Returns:
signal signal number
staticgetSysField(handle:CrashHandle, index:CrashSysField):Null<String>
- Reads a system field from a loaded crash dump.
Parameters:
handle | crash dump handle |
|---|---|
index | system field enum. Must be less than |
Returns:
value recorded in the crash dump, or nil if it didn't exist
staticgetUserField(handle:CrashHandle, index:Int):String
- Reads user field from a loaded crash dump.
Parameters:
handle | crash dump handle |
|---|---|
index | user data slot index |
Returns:
user data value recorded in the crash dump
staticloadPrevious():Null<CrashHandle>
- Loads a previously written crash dump.
The crash dump will be removed from disk upon a successful load, so loading is one-shot.
Returns:
handle handle to the loaded dump, or nil if no dump was found.
staticrelease(handle:CrashHandle):Void
- Releases a previously loaded crash dump.
Parameters:
handle | handle to loaded crash dump |
|---|
staticsetFilePath(path:String):Void
- Sets the file location for crash dumps.
Crashes occuring before the path is set will be stored to a default engine location.
Parameters:
path | file path to use |
|---|
staticsetUserField(index:Int, value:String):Void
- Stores user-defined string value.
Store a user value that will get written to a crash dump when a crash occurs. This can be user ids, breadcrumb data etc.
There are 32 slots indexed from 0. Each slot stores at most 255 characters.
Parameters:
index | slot index. 0-indexed. |
|---|---|
value | string value to store |
staticwriteDump():Void
- Writes crash dump.
Performs the same steps as if a crash had just occured but allows the program to continue.
The generated dump can be read by Crash.load_previous.