View comments | RSS feed

Application.onStatus

Availability

Flash Communication Server MX 1.0.

Usage

application.onStatus = function (infoObject){}

Parameters

infoObject An object that contains the error level, code, and sometimes a description. For more information, 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");
};

Comments


Robert Clarkson said on Oct 4, 2006 at 6:31 AM :
More information can be obtained using the code and details of the info object, like this:

application.onStatus = function(info)
{
trace("Status message recieved");
trace("Code: " + info.code);
trace("Details: " + info.details);
}

Robert Clarkson
Broadmedia Technology

 

RSS feed | Send me an e-mail when comments are added to this page | Comment Report

Current page: http://livedocs.adobe.com/fms/2/docs/00000659.html