[Javascript] Try and Catch Question

Scott Reynen scott at randomchaos.com
Tue Mar 3 15:20:46 CST 2009


On [Mar 3], at [ Mar 3] 1:58 , Alexander Freiria wrote:

>>> The "catch(whatever)" is obviously a function-call
>>
>>
>> Uh, no. catch specifies where the program flow should go when throw  
>> is
>> executed in the block preceding the catch.
>

> I second that. That is what the function of the catch is for...


To be a bit pedantic, catch is not actually a function, despite having  
similar syntax.  You can assign a function to a variable, for example,  
but you'll get a syntax error if you try to assign catch to a variable.

Peace,
Scott



More information about the Javascript mailing list