Flash Media Server |
|||
| Server-Side ActionScript Language Reference > Server-Side ActionScript Language Reference > Application class > Application.onStatus | |||
Flash Communication Server MX 1.0.
application.onStatus = function (infoObject){}
infoObject An object that contains the error level, code, and sometimes a description. For more information, see Server-Side Information Objects.
Any value that the callback function returns.
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.
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");
};