Mykola, I'm slightly confused by your post in contrast to what Sergey and Stanislav originally said.
 
I read Sergey's post as that he was having trouble with uncaught exceptions and had to add a lot of code to catch and possibly ignore such errors. I read your post to mean the opposite of this in that the uncaught exceptions were important at development time because if they were silently caught and ignored it would be hard to diagnose what the problem was.
 
As Matt said, in general for our data services framework code we tend to not throw exceptions but instead funnel everything through a fault event mechanism. If you run into exceptions in our Flex framework code then it may be a bug and should be reported with a reproducible case or at the very least a stacktrace. If these exceptions are due to non-Flex framework code then either its a bug in that 3rd party code or, as Matt suggested, the number of entry points that need to be checked can be reduced by centralizing the calling code.
 
Finally, the behavior of uncaught exceptions isn't determined by Flex - it's a feature of the Flash Player virtual machine and how it handles ActionScript.
 


From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Mykola Paliyenko
Sent: Monday, April 24, 2006 3:34 AM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Uncaught exceptions in Flex 1.5

Hm...
Matt, I thought the problem will be fixed in 2.0, because developing in the runtime that silently ignors the exceptions is absolutely unaceptable for a lot of developers. It is extremely hard to locate problems in this case. I can understand why it is not implemented in Flex 1.5 since the flash player did not changed, but I see no reasons why whould not introduce this with a new version of player or at least allow player to run in a debug mode where such stuff will be handled.

Mykola

On 4/23/06, Matt Chotin <[EMAIL PROTECTED]> wrote:
I see, the same problem exists in 2.0 I guess too (though I've asked
internally about it to make sure).  Only thing I can recommend is you
try to centralize your entry points.  If you use a framework like
Cairngorm you can do that in the framework by catching errors in the
broadcaster or some main method that triggers your service handlers.

Matt


-----Original Message-----
From: flexcoders@yahoogroups.com [mailto: flexcoders@yahoogroups.com] On
Behalf Of Stanislav Zayarsky
Sent: Sunday, April 23, 2006 3:45 AM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Uncaught exceptions in Flex 1.5

Matt, we are using 3rd party libraries like AS2lib, and it throws
exceptions.
And also we starting to throw exceptions from our custom classes too.

Best regards
Stanislav

On 4/23/06, Matt Chotin <[EMAIL PROTECTED]> wrote:
> In 1.5 we don't throw exceptions as a practice, I'm not sure what
you're
> actually running into here?
>
> -----Original Message-----
> From: flexcoders@yahoogroups.com [mailto: flexcoders@yahoogroups.com]
On
> Behalf Of Stanislav Zayarsky
> Sent: Saturday, April 22, 2006 7:52 AM
> To: flexcoders@yahoogroups.com
> Subject: Re: [flexcoders] Uncaught exceptions in Flex 1.5
>
> Hello FlexCoders,
>
> I have the same problem!
>
> Adobe guys, can you help us?
>
> Best regards
> Stanislav
>
> On 4/21/06, Sergey Kovalyov <[EMAIL PROTECTED]> wrote:
> > Hi All!
> >
> > How to deal with uncaught exceptions in Flex 1.5? Actually they kill
> > application running via terminating the current script.
> >
> > Due to the fact Flex application has a lot of "entry points" (each
and
> every
> > event handling delegate), I  need either put try..catch..finally
> statements
> > in each and every function assigned as an event handler that is
wrong
> copy
> > and paste method or create own Delegate class that is much more
better
> by
> > design.
> >
> > But on the other hand using the second approach force me not to
assign
> event
> > handlers in MXML (like <mx:Button click="onClick()">). Instead we
need
> to
> > assign those handlers in linked ActionScript class. It's very
> difficult when
> > you deal with complex nested structures, repeaters, ViewStack,
> Accordion and
> > their successors.
> >
> > Any suggestions?
> >
> > Thank you in advance.
> >
> > Regards, Sergey.


--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com




YAHOO! GROUPS LINKS




Reply via email to