Server-Side Communication ActionScript > Application.onStatus

 

Application.onStatus

Availability

Flash Communication Server MX.

Usage

application.onStatus = function (infoObject){
	// insert code here
};

Parameters

infoObject An object that contains the error level, code, and sometimes a description. See Server-Side Information Objects.

Returns

Any value that the callback function returns.

Description

Event handler; invoked when the server encounters an error while processing a message that was targeted at this application instance. The application.onStatus event handler is the root for any Stream.onStatus or NetConnection.onStatus messages that don't find handlers. Also, there are a few status calls that come only to application.onStatus. This event handler can be used for debugging messages that generate errors.

Example

The following example defines a function that sends a trace statement whenever the application.onStatus method is invoked. You can also define a function that gives users specific feedback about the type of error that occurred.

appInstance.onStatus = function(infoObject){
	trace("An application error occurred");
};