Actions Error Event Modes

XLua supports two modes of triggering error reporting events: Immediate and Queued modes.  In Immediate Mode, when an error is detected in XLua, any On Error events will be triggerred for immediate execution.  In Queued Mode, the On Error events will wait to be executed at the end of the event loop.

In most instances, Immediate Mode will give the desired application behavior, but because it interrupts whatever is currently executing (which may be a chunk of Lua code, or some condition, or an expression behing evaluated), it may interact in unexpected ways with the rest of the application, and cause it to crash.  This is particular true for error reporting, because errors are in general unexpected and often uncontrolled.

Queued Mode will instead delay reporting errors until the end of the current event loop, at which point all events will be reported in bulk.  Due to MMF limitations however, only a small number (empirically, 20) of events can be queued, at which point any further errors will simply go unreported.

Set Immediate

Sets future error events to immediate mode. Immediate mode causes any On Error triggered events to execute immediately when an error occurs.

Parameters

None.

Set Queued

Sets future error events to queued mode. Queued mode causes any On Error triggered events from when errors occur to be queued up and executed at the end of MMF's event loop.

Parameters

None.

Copyright 2010 Justin Aquadro