Errors and Diagnostics

Error Codes

A category narrows the cause; context and message explain the specific failed operation. Do not retry unchanged invalid geometry indefinitely. Initialization and simulation errors should stop dependent gameplay until recovery succeeds.

APIContract
JOLT_ERROR_NONE = 0No error; a valid query miss also belongs here.
JOLT_ERROR_INVALID_ARGUMENT = 1Invalid value, dimensions or input structure.
JOLT_ERROR_INITIALIZATION_FAILED = 2Runtime initialization failed.
JOLT_ERROR_INVALID_HANDLE = 3Invalid, stale or wrong-owner resource identity.
JOLT_ERROR_CREATION_FAILED = 4Native resource could not be created.
JOLT_ERROR_SIMULATION_FAILED = 5World stepping failed.
JOLT_ERROR_INTERNAL_EXCEPTION = 6An exception was translated at the native boundary.
JOLT_ERROR_INVALID_OPERATION = 7Operation is incompatible with current state or type.
JOLT_ERROR_QUERY_FAILED = 8Query execution failed.
GML
var err = jolt_get_error();
if (err.code == JOLT_ERROR_INVALID_ARGUMENT) {
    show_debug_message("Check input: " + err.message);
} else if (err.code != JOLT_ERROR_NONE) {
    show_debug_message(err.context + ": " + err.message);
}