asobi_lua_dev_errors (asobi v0.75.1)

View Source

Dev-mode surfacing of Lua callback errors to the triggering client.

By default a failing callback is log + telemetry only, so script internals never reach arbitrary players in production. With dev errors enabled the player whose input triggered the failure also receives a module.error event (and its deprecated game.error twin, until the 1.0 wire break) carrying the callback name, script basename and Lua error message - without it a broken handle_input is indistinguishable client-side from one that never ran.

Enable via {asobi_lua, [{dev_errors, true}]} or ASOBI_DEV_ERRORS=true (also accepts 1). Any other value means off: unlike hot-reload's fail-open default, this flag leaks script internals, so it fails closed.

Summary

Functions

Notify PlayerId of a failed Callback when dev errors are enabled.

Functions

enabled()

-spec enabled() -> boolean().

maybe_notify(Callback, Reason, PlayerId, State)

-spec maybe_notify(atom(), term(), binary(), map()) -> map().

Notify PlayerId of a failed Callback when dev errors are enabled.

State is the bridge state map (carries script and the rate-limit stamp); the possibly-updated map is returned and must be kept by the caller so the rate limit holds.