|Manuals

onError

Description

Occurs when an error is triggered. The event will be fired when a runtime error occurs in the application.

Syntax

virtualUI.onError = function(message) {
    // Your error handling code here
};

Parameters

Parameter Type Description
handler Function Callback function that executes when the event fires
message String Error message describing what went wrong

Return Value

None.

Remarks

This event provides error information when something goes wrong during application execution. Use this event to handle errors gracefully, log error information, or display user-friendly error messages.

Example

var virtualUI = new Thinfinity.VirtualUI();

virtualUI.onError = function(message) {
    console.error('VirtualUI Error: ' + message);
    // Log the error
    // Display error notification to user
    // Attempt recovery if possible
    alert('An error occurred: ' + message);
};

See Also