- Select ref document -

Crash API documentation

version 1.2.149

Native crash logging functions and constants.

Functions

Constants

Functions

crash.get_backtrace

crash.get_backtrace(handle)

A table is returned containing the addresses of the call stack.

Parameters

handle

number crash dump handle

handle

number crash dump handle

Returns

backtrace

table table containing the backtrace

backtrace

table table containing the backtrace

crash.get_extra_data

crash.get_extra_data(handle)

The format of read text blob is platform specific and not guaranteed but can be useful for manual inspection.

Parameters

handle

number crash dump handle

handle

number crash dump handle

Returns

blob

string string with the platform specific data

blob

string string with the platform specific data

crash.get_modules

crash.get_modules(handle)

The function returns a table containing entries with sub-tables that have fields 'name' and 'address' set for all loaded modules.

Parameters

handle

number crash dump handle

handle

number crash dump handle

Returns

modules

table module table

modules

table module table

crash.get_signum

crash.get_signum(handle)

Parameters

handle

number crash dump handle

handle

number crash dump handle

Returns

signal

number signal number

signal

number signal number

crash.get_sys_field

crash.get_sys_field(handle, index)

Parameters

handle

number crash dump handle

index

number system field enum. Must be less than crash.SYSFIELD_MAX

handle

number crash dump handle

index

number system field enum. Must be less than crash.SYSFIELD_MAX

Returns

value

string value recorded in the crash dump, or nil if it didn't exist

value

string value recorded in the crash dump, or nil if it didn't exist

crash.get_user_field

crash.get_user_field(handle, index)

Parameters

handle

number crash dump handle

index

number user data slot index

handle

number crash dump handle

index

number user data slot index

Returns

value

string user data value recorded in the crash dump

value

string user data value recorded in the crash dump

crash.load_previous

crash.load_previous()

The crash dump will be removed from disk upon a successful load, so loading is one-shot.

Returns

handle

number handle to the loaded dump, or nil if no dump was found

handle

number handle to the loaded dump, or nil if no dump was found

crash.release

crash.release(handle)

Parameters

handle

number handle to loaded crash dump

handle

number handle to loaded crash dump

crash.set_file_path

crash.set_file_path(path)

Crashes occuring before the path is set will be stored to a default engine location.

Parameters

path

string file path to use

path

string file path to use

crash.set_user_field

crash.set_user_field(index, value)

Store a user value that will get written to a crash dump when a crash occurs. This can be user id:s, breadcrumb data etc. There are 32 slots indexed from 0. Each slot stores at most 255 characters.

Parameters

index

number slot index. 0-indexed

value

string string value to store

index

number slot index. 0-indexed

value

string string value to store

crash.write_dump

crash.write_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

Constants

crash.SYSFIELD_ANDROID_BUILD_FINGERPRINT

crash.SYSFIELD_DEVICE_LANGUAGE

crash.SYSFIELD_DEVICE_MODEL

crash.SYSFIELD_ENGINE_HASH

crash.SYSFIELD_ENGINE_VERSION

crash.SYSFIELD_LANGUAGE

crash.SYSFIELD_MANUFACTURER

crash.SYSFIELD_MAX

crash.SYSFIELD_SYSTEM_NAME

crash.SYSFIELD_SYSTEM_VERSION

crash.SYSFIELD_TERRITORY

crash.USERFIELD_MAX

crash.USERFIELD_SIZE