onError

app.onError

Description

The name of a callback function that is called when an error occurs. By creating a function and assigning it to this attribute, you can respond to errors systematically; for example, you can close and restart the application, noting the error in a log file if it occurred during rendering.

The callback function is passed the error string and a severity string. It should not return any value.

Type

A function name string, or null if no function is assigned; read/write.

Example

function err(errString) {
alert(errString);
}

app.onError = err;

Other Tags

Posted in Application object and tagged , , , , , , , , , , .