Afternoon,

I have a number of CFCs which I'm accessing through RemoteObject calls.
I've noticed that if CodlFusion throws an error (built-in or custom)
then the reponse comes back with an event type of "Status", which isn't
handled by either the result or fault handlers specified for the
callback.

I'm using the following to set up the remote call:

<mx:RemoteObject id="rSlide" source="api.Slide">
    <mx:method name="getSlide"
               result="event.call.resultHandler(event)"
               fault="event.call.faulthandler(event)" />
</mx:RemoteObject>

And then this ActionScript to call it:

function getSlideResult(event:Object) { ... }
function getSlideFault(event:Object) { ... }
Function getSlide(slideid:Number) {
    var call = rSlide.getSlide({slideid:slideid});
    call.resultHandler = Delegate.create(this, getSlideResult);
    call.faultHandler = Delegate.create(this, getSlideFault);
}

If an error occurs (in this case, the item we're trying to get doesn't
exist so a custom error is thrown) then neither getSlideResult or
getSlideFault fire.  I get the following information back from the
NetConn debugger:

DebugId: 0
EventType: "Status"
MovieUrl: "http://localhost:8700/flex/remote.mxml.swf";
Protocol: "http"
Source: "Client"
Time: 1114687271399
Date (object #1)
....."Thu Apr 28 12:21:11 GMT+0100 2005"
Status (object #2)
.....code: "SERVER.PROCESSING"
.....description: "Service threw an exception during method invocation:
[Slide.GetSlide.SlideNotFound] The requested slide (ID 6) cannot be
found."
.....details: "coldfusion.runtime.CustomException:
[Slide.GetSlide.SlideNotFound] The requested slide (ID 6) cannot be
found." [long error report snipped]

Is there any way of specifying a handler for these "status" events?

Cheers,

Tim.

--
-------------------------------------------------------
Badpen Tech - CF and web-tech: http://tech.badpen.com/
-------------------------------------------------------
    RAWNET LTD - independent digital media agency
    "We are big, we are funny and we are clever!"
     New site launched at http://www.rawnet.com/
-------------------------------------------------------
This message may contain information which is legally
privileged and/or confidential.  If you are not the
intended recipient, you are hereby notified that any
unauthorised disclosure, copying, distribution or use
of this information is strictly prohibited. Such
notification notwithstanding, any comments, opinions,
information or conclusions expressed in this message
are those of the originator, not of rawnet limited,
unless otherwise explicitly and independently indicated
by an authorised representative of rawnet limited.
-------------------------------------------------------


 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/flexcoders/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply via email to