yes, a faultEvent is passed which has the info in it. I dont have the exact
syntax at the moment.

On 2/7/07, dantmcgowan <[EMAIL PROTECTED]> wrote:

  Peter, Clint,
Thanks. One last question: so in the event handler do I have any
access to the exception that was raised (for trace purposes)?
Dan

--- In [email protected] <flexcoders%40yahoogroups.com>, "Peter
Farland" <[EMAIL PROTECTED]> wrote:
>
> Right, the requests made by HTTPService are asynchronous... so you have
> to wait for events to be dispatched some time later. Any errors that
> occur prior to actually sending the request are typically caught and
> dispatched as fault events too so there shouldn't be a need for a
> try/catch.
>
>
>
> ________________________________
>
> From: [email protected] <flexcoders%40yahoogroups.com> [mailto:
[email protected] <flexcoders%40yahoogroups.com>] On
> Behalf Of Clint Tredway
> Sent: Wednesday, February 07, 2007 2:37 PM
> To: [email protected] <flexcoders%40yahoogroups.com>
> Subject: Re: [flexcoders] basic exception handling
>
>
>
> there is a fault attribute of the HTTPService tag that you can set to a
> function. that will catch any faults from the call.
>
>
> On 2/7/07, dantmcgowan < [EMAIL PROTECTED]
> <mailto:[EMAIL PROTECTED]> > wrote:
>
> All,
> When I am catching exceptions the catch seems to be ignored and
> the
> actionscript error window pops up. For example if I have a
> simple
> service like this:
>
> <mx:HTTPService
> id="simpleService"
> url="http://example.com/someservice/
> <http://example.com/someservice/> "
> useProxy="false"
> method="GET">
>
> And I have a try catch block like this with one statement
> inside. If I
> comment out this statement no errors...so I know this statement
> is
> causing the error:
>
> try {
> simpleService.send();
> }
> catch(errObject:Error) {
> trace("<Error> "+errObject.message);
> }
>
> The scenarios that throw errors (for example TypeError: Error
> #1034)
> opens the actionscript error window and the trace does not
> appear.
> What do I need to be doing so the exception is consumed in the
> catch
> and no error window? Thanks,
>
> Dan
>
>
>
>
>
>
>
>
> --
> http://indeegrumpee.spaces.live.com/
> <http://indeegrumpee.spaces.live.com/>
>




--
http://indeegrumpee.spaces.live.com/

Reply via email to