[Laszlo-dev] try/catch

Donald Anderson dda at ddanderson.com
Mon Oct 29 13:11:56 PDT 2007


That doesn't seem to phase it -- at least in SWF,
no error.  I do get an error in dhtml.

- Don

On Oct 29, 2007, at 3:39 PM, P T Withington wrote:

> You can't get divide by zero errors because it is not an error.   
> You get NaN.
>
> Try something like:
>
> 'x' instanceof 3
>
> if the compiler lets that through, instanceof is supposed to signal  
> an error if the rhs is not a Function (aka class).
>
> On 2007-10-29, at 15:17 EDT, Donald Anderson wrote:
>
>> I have an implemention of try/catch/finally that matches what the  
>> Adobe
>> compiler produces.  However, I cannot produce any code that fires
>> an exception and I have not yet implemented 'throw'.  Is there a
>> way to get an exception - I've tried division by zero, opening  
>> nonexistent
>> files, etc.   Throw shouldn't be difficult to implement - is it  
>> useful to have
>> try/catch that only responds to throw?
>>
>> - Don
>>
>>
>> On Oct 17, 2007, at 6:01 PM, Max Carlson wrote:
>>
>>> This is fairly important - it would be great to have exceptions  
>>> in SWF!
>>>
>>> P T Withington wrote:
>>>> Well, if you get bored with other stuff...
>>>> On 2007-10-17, at 13:48 EDT, Donald Anderson wrote:
>>>>> I think it's a good idea.
>>>>> I assume there is some support for exceptions in SWF
>>>>> for use in the future.  I bet it's not too hard to do.
>>>>>
>>>>> - Don
>>>>>
>>>>> On Oct 17, 2007, at 1:07 PM, P T Withington wrote:
>>>>>
>>>>>> What do you think about at least permitting try/catch in swf  
>>>>>> for now, even if we just pass the try block through as a  
>>>>>> block, ignore any catch and pass through any finally.  It's  
>>>>>> lame, but it would let us unify a bunch of the LFC code base.
>>>>>>
>>>>>> Then when we have time, we can actually implement the correct  
>>>>>> code generation for it...
>>>>>
>>>>>
>>>>> -- 
>>>>>
>>>>> Don Anderson
>>>>> Java/C/C++, Berkeley DB, systems consultant
>>>>>
>>>>> Voice:  617-547-7881
>>>>> Email:  dda at ddanderson.com
>>>>> WWW:    http://www.ddanderson.com
>>>>>
>>>
>>> -- 
>>> Regards,
>>> Max Carlson
>>> OpenLaszlo.org
>>
>>
>> --
>>
>> Don Anderson
>> Java/C/C++, Berkeley DB, systems consultant
>>
>> Voice:  617-547-7881
>> Email:  dda at ddanderson.com
>> WWW:    http://www.ddanderson.com
>>
>


--

Don Anderson
Java/C/C++, Berkeley DB, systems consultant

Voice:  617-547-7881
Email:  dda at ddanderson.com
WWW:    http://www.ddanderson.com



More information about the Laszlo-dev mailing list