Returning errors from AMFPHP on purpose.

Posted by Morieris on Stack Overflow See other posts from Stack Overflow or by Morieris
Published on 2010-03-19T20:43:40Z Indexed on 2010/03/19 21:51 UTC
Read the original article Hit count: 456

Filed under:
|
|
|
|

When using flash remoting with amfphp, what can I write in php that will trigger the 'status' method that I set up in my Responder in Flash?

Or more generally, how can I determine if the service call has failed? The ideal solution for me would be to throw some exception in php serverside, and catch that exception in flash clientside... How do other people handle server errors with flash remoting?

var responder = new Responder(
    function() {
        trace("some normal execution finished successfully.  this is fine.");
    }, function(e) { 
        trace("how do I make this trigger when my server tells me something bad happened?");
    } 
);
myService = new NetConnection;
myService.connect("http://localhost:88/amfphp/gateway.php");
myService.call("someclass.someservice", responder);

© Stack Overflow or respective owner

Related posts about flash

Related posts about remoting