You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@flex.apache.org by Mihai Chira <mi...@gmail.com> on 2014/08/08 18:07:46 UTC

Re: Why can't we try-catch errors thrown from event handlers?

Done.

As mentioned in this comment[1], I was wondering if we could also
contact someone from Adobe about including this information in the
asdoc pages for LoaderInfo.uncaughtErrorEvents. Any ideas who?

Also, do do we regenerate our asdocs[2] on each release? This would
mean that this commit didn't make it for 4.13, I guess?

[1] https://issues.apache.org/jira/browse/FLEX-34385?focusedCommentId=14060641&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-14060641
[2] http://flex.apache.org/asdoc/index.html

On 26 June 2014 17:16, Mihai Chira <mi...@gmail.com> wrote:
> Cool, and thanks for the guidelines.
>
> On 26 June 2014 16:49, Alex Harui <ah...@adobe.com> wrote:
>> No objection from me.  For simple, easily reversible code changes, I just
>> do them and let folks object when they see the commit email.  Otherwise, I
>> try to let an email sit about 24 hours, then go and do it.  For big
>> things, I try to warn folks up front as I start on it.
>>
>> On 6/26/14 8:35 AM, "Mihai Chira" <mi...@gmail.com> wrote:
>>
>>>Cool, thanks for the explanation. I'm happy to take this[1] on, if we
>>>agree it's worth doing (I definitely think it is).
>>>
>>>[1] https://issues.apache.org/jira/browse/FLEX-34385
>>>
>>>On 26 June 2014 05:49, Alex Harui <ah...@adobe.com> wrote:
>>>>
>>>>
>>>> On 6/25/14 4:53 AM, "Mihai Chira" <mi...@gmail.com> wrote:
>>>>
>>>>>Today I stumbled upon what feels like strange behaviour. In short, if
>>>>>there's an Error thrown in an event listener, it won't be caught in
>>>>>the catch block of the code that dispatched the event. Instead, it
>>>>>will be dispatched by the uncaughtErrorEvents property of LoaderInfo.
>>>>>(See the code below.)
>>>> Yep, that is expected behavior.  I believe it has to do with the
>>>> stack/activationObject getting lost in the player's dispatchEvent code.
>>>> I
>>>> think there are other cases where, if you call into the player and the
>>>> player calls more ActionScript that you can't catch errors in that AS.
>>>>>
>>>>>Does this imply that event dispatching is asynchronous? Despite that
>>>>>the stack traces always include the event dispatching, and thus seem
>>>>>to imply it's synchronous? Or just the fact that it happens at a lower
>>>>>level (within the C++ code of the flash player, perhaps?) impacts
>>>>>try-catch blocks?
>>>> No, event dispatching is synchronous.
>>>>>
>>>>>In any case, I think it would really help if we updated the
>>>>>documentation under LoaderInfo.uncaughtErrorEvents [1] and the
>>>>>description of the UncaughtErrorEvents class [2] to include this.
>>>> Well, we can't since that's a player API.   UIComponent does wrap
>>>> dispatchEvent so you could add some documentation there.  Or we could
>>>> start a Wiki page of "Nasty Issues".  You are now a committer.  Go for
>>>>it!
>>>>
>>>> -Alex
>>>>
>>

Re: Why can't we try-catch errors thrown from event handlers?

Posted by Mihai Chira <mi...@gmail.com>.
Thanks, Alex. I've opened a feature request with Adobe[1] for this. If
people think it would be useful, please vote for it.

[1] https://bugbase.adobe.com/index.cfm?event=bug&id=3809613

On 8 August 2014 21:26, Alex Harui <ah...@adobe.com> wrote:
>
>
> On 8/8/14 9:07 AM, "Mihai Chira" <mi...@gmail.com> wrote:
>
>>Done.
>>
>>As mentioned in this comment[1], I was wondering if we could also
>>contact someone from Adobe about including this information in the
>>asdoc pages for LoaderInfo.uncaughtErrorEvents. Any ideas who?
> File a bug at bugbase.adobe.com.
>
>>
>>Also, do do we regenerate our asdocs[2] on each release? This would
>>mean that this commit didn't make it for 4.13, I guess?
> Yes, that commit was after the last release candidate for 4.13.
>
> -Alex
>

Re: Why can't we try-catch errors thrown from event handlers?

Posted by Alex Harui <ah...@adobe.com>.

On 8/8/14 9:07 AM, "Mihai Chira" <mi...@gmail.com> wrote:

>Done.
>
>As mentioned in this comment[1], I was wondering if we could also
>contact someone from Adobe about including this information in the
>asdoc pages for LoaderInfo.uncaughtErrorEvents. Any ideas who?
File a bug at bugbase.adobe.com.

>
>Also, do do we regenerate our asdocs[2] on each release? This would
>mean that this commit didn't make it for 4.13, I guess?
Yes, that commit was after the last release candidate for 4.13.

-Alex